mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-e8dce79953a38a31/out/
ualberta.rs

1#![doc = "MAVLink ualberta dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::bitflags;
9use mavlink_core::{bytes::Bytes, bytes_mut::BytesMut, MavlinkVersion, Message, MessageData};
10#[allow(unused_imports)]
11use num_derive::FromPrimitive;
12#[allow(unused_imports)]
13use num_derive::ToPrimitive;
14#[allow(unused_imports)]
15use num_traits::FromPrimitive;
16#[allow(unused_imports)]
17use num_traits::ToPrimitive;
18#[cfg(feature = "serde")]
19use serde::{Deserialize, Serialize};
20#[cfg(feature = "ts")]
21use ts_rs::TS;
22pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
23#[cfg_attr(feature = "ts", derive(TS))]
24#[cfg_attr(feature = "ts", ts(export))]
25#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
26#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27#[cfg_attr(feature = "serde", serde(tag = "type"))]
28#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29#[repr(u32)]
30#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
31pub enum ActuatorConfiguration {
32    #[doc = "Do nothing."]
33    ACTUATOR_CONFIGURATION_NONE = 0,
34    #[doc = "Command the actuator to beep now."]
35    ACTUATOR_CONFIGURATION_BEEP = 1,
36    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
37    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
38    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
39    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
40    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
41    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
42    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
43    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
44}
45impl ActuatorConfiguration {
46    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
47}
48impl Default for ActuatorConfiguration {
49    fn default() -> Self {
50        Self::DEFAULT
51    }
52}
53#[cfg_attr(feature = "ts", derive(TS))]
54#[cfg_attr(feature = "ts", ts(export))]
55#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
56#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
57#[cfg_attr(feature = "serde", serde(tag = "type"))]
58#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
59#[repr(u32)]
60#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
61pub enum ActuatorOutputFunction {
62    #[doc = "No function (disabled)."]
63    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
64    #[doc = "Motor 1"]
65    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
66    #[doc = "Motor 2"]
67    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
68    #[doc = "Motor 3"]
69    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
70    #[doc = "Motor 4"]
71    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
72    #[doc = "Motor 5"]
73    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
74    #[doc = "Motor 6"]
75    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
76    #[doc = "Motor 7"]
77    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
78    #[doc = "Motor 8"]
79    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
80    #[doc = "Motor 9"]
81    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
82    #[doc = "Motor 10"]
83    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
84    #[doc = "Motor 11"]
85    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
86    #[doc = "Motor 12"]
87    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
88    #[doc = "Motor 13"]
89    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
90    #[doc = "Motor 14"]
91    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
92    #[doc = "Motor 15"]
93    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
94    #[doc = "Motor 16"]
95    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
96    #[doc = "Servo 1"]
97    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
98    #[doc = "Servo 2"]
99    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
100    #[doc = "Servo 3"]
101    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
102    #[doc = "Servo 4"]
103    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
104    #[doc = "Servo 5"]
105    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
106    #[doc = "Servo 6"]
107    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
108    #[doc = "Servo 7"]
109    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
110    #[doc = "Servo 8"]
111    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
112    #[doc = "Servo 9"]
113    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
114    #[doc = "Servo 10"]
115    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
116    #[doc = "Servo 11"]
117    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
118    #[doc = "Servo 12"]
119    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
120    #[doc = "Servo 13"]
121    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
122    #[doc = "Servo 14"]
123    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
124    #[doc = "Servo 15"]
125    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
126    #[doc = "Servo 16"]
127    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
128}
129impl ActuatorOutputFunction {
130    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
131}
132impl Default for ActuatorOutputFunction {
133    fn default() -> Self {
134        Self::DEFAULT
135    }
136}
137#[cfg_attr(feature = "ts", derive(TS))]
138#[cfg_attr(feature = "ts", ts(export))]
139#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
140#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
141#[cfg_attr(feature = "serde", serde(tag = "type"))]
142#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
143#[repr(u32)]
144#[doc = "Enumeration of the ADSB altimeter types"]
145pub enum AdsbAltitudeType {
146    #[doc = "Altitude reported from a Baro source using QNH reference"]
147    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
148    #[doc = "Altitude reported from a GNSS source"]
149    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
150}
151impl AdsbAltitudeType {
152    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
153}
154impl Default for AdsbAltitudeType {
155    fn default() -> Self {
156        Self::DEFAULT
157    }
158}
159#[cfg_attr(feature = "ts", derive(TS))]
160#[cfg_attr(feature = "ts", ts(export))]
161#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
162#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
163#[cfg_attr(feature = "serde", serde(tag = "type"))]
164#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
165#[repr(u32)]
166#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
167pub enum AdsbEmitterType {
168    ADSB_EMITTER_TYPE_NO_INFO = 0,
169    ADSB_EMITTER_TYPE_LIGHT = 1,
170    ADSB_EMITTER_TYPE_SMALL = 2,
171    ADSB_EMITTER_TYPE_LARGE = 3,
172    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
173    ADSB_EMITTER_TYPE_HEAVY = 5,
174    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
175    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
176    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
177    ADSB_EMITTER_TYPE_GLIDER = 9,
178    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
179    ADSB_EMITTER_TYPE_PARACHUTE = 11,
180    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
181    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
182    ADSB_EMITTER_TYPE_UAV = 14,
183    ADSB_EMITTER_TYPE_SPACE = 15,
184    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
185    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
186    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
187    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
188}
189impl AdsbEmitterType {
190    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
191}
192impl Default for AdsbEmitterType {
193    fn default() -> Self {
194        Self::DEFAULT
195    }
196}
197bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
198impl AdsbFlags {
199    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
200}
201impl Default for AdsbFlags {
202    fn default() -> Self {
203        Self::DEFAULT
204    }
205}
206bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
207impl AisFlags {
208    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
209}
210impl Default for AisFlags {
211    fn default() -> Self {
212        Self::DEFAULT
213    }
214}
215#[cfg_attr(feature = "ts", derive(TS))]
216#[cfg_attr(feature = "ts", ts(export))]
217#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
218#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
219#[cfg_attr(feature = "serde", serde(tag = "type"))]
220#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
221#[repr(u32)]
222#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
223pub enum AisNavStatus {
224    #[doc = "Under way using engine."]
225    UNDER_WAY = 0,
226    AIS_NAV_ANCHORED = 1,
227    AIS_NAV_UN_COMMANDED = 2,
228    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
229    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
230    AIS_NAV_MOORED = 5,
231    AIS_NAV_AGROUND = 6,
232    AIS_NAV_FISHING = 7,
233    AIS_NAV_SAILING = 8,
234    AIS_NAV_RESERVED_HSC = 9,
235    AIS_NAV_RESERVED_WIG = 10,
236    AIS_NAV_RESERVED_1 = 11,
237    AIS_NAV_RESERVED_2 = 12,
238    AIS_NAV_RESERVED_3 = 13,
239    #[doc = "Search And Rescue Transponder."]
240    AIS_NAV_AIS_SART = 14,
241    #[doc = "Not available (default)."]
242    AIS_NAV_UNKNOWN = 15,
243}
244impl AisNavStatus {
245    pub const DEFAULT: Self = Self::UNDER_WAY;
246}
247impl Default for AisNavStatus {
248    fn default() -> Self {
249        Self::DEFAULT
250    }
251}
252#[cfg_attr(feature = "ts", derive(TS))]
253#[cfg_attr(feature = "ts", ts(export))]
254#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
256#[cfg_attr(feature = "serde", serde(tag = "type"))]
257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
258#[repr(u32)]
259#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
260pub enum AisType {
261    #[doc = "Not available (default)."]
262    AIS_TYPE_UNKNOWN = 0,
263    AIS_TYPE_RESERVED_1 = 1,
264    AIS_TYPE_RESERVED_2 = 2,
265    AIS_TYPE_RESERVED_3 = 3,
266    AIS_TYPE_RESERVED_4 = 4,
267    AIS_TYPE_RESERVED_5 = 5,
268    AIS_TYPE_RESERVED_6 = 6,
269    AIS_TYPE_RESERVED_7 = 7,
270    AIS_TYPE_RESERVED_8 = 8,
271    AIS_TYPE_RESERVED_9 = 9,
272    AIS_TYPE_RESERVED_10 = 10,
273    AIS_TYPE_RESERVED_11 = 11,
274    AIS_TYPE_RESERVED_12 = 12,
275    AIS_TYPE_RESERVED_13 = 13,
276    AIS_TYPE_RESERVED_14 = 14,
277    AIS_TYPE_RESERVED_15 = 15,
278    AIS_TYPE_RESERVED_16 = 16,
279    AIS_TYPE_RESERVED_17 = 17,
280    AIS_TYPE_RESERVED_18 = 18,
281    AIS_TYPE_RESERVED_19 = 19,
282    #[doc = "Wing In Ground effect."]
283    AIS_TYPE_WIG = 20,
284    AIS_TYPE_WIG_HAZARDOUS_A = 21,
285    AIS_TYPE_WIG_HAZARDOUS_B = 22,
286    AIS_TYPE_WIG_HAZARDOUS_C = 23,
287    AIS_TYPE_WIG_HAZARDOUS_D = 24,
288    AIS_TYPE_WIG_RESERVED_1 = 25,
289    AIS_TYPE_WIG_RESERVED_2 = 26,
290    AIS_TYPE_WIG_RESERVED_3 = 27,
291    AIS_TYPE_WIG_RESERVED_4 = 28,
292    AIS_TYPE_WIG_RESERVED_5 = 29,
293    AIS_TYPE_FISHING = 30,
294    AIS_TYPE_TOWING = 31,
295    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
296    AIS_TYPE_TOWING_LARGE = 32,
297    #[doc = "Dredging or other underwater ops."]
298    AIS_TYPE_DREDGING = 33,
299    AIS_TYPE_DIVING = 34,
300    AIS_TYPE_MILITARY = 35,
301    AIS_TYPE_SAILING = 36,
302    AIS_TYPE_PLEASURE = 37,
303    AIS_TYPE_RESERVED_20 = 38,
304    AIS_TYPE_RESERVED_21 = 39,
305    #[doc = "High Speed Craft."]
306    AIS_TYPE_HSC = 40,
307    AIS_TYPE_HSC_HAZARDOUS_A = 41,
308    AIS_TYPE_HSC_HAZARDOUS_B = 42,
309    AIS_TYPE_HSC_HAZARDOUS_C = 43,
310    AIS_TYPE_HSC_HAZARDOUS_D = 44,
311    AIS_TYPE_HSC_RESERVED_1 = 45,
312    AIS_TYPE_HSC_RESERVED_2 = 46,
313    AIS_TYPE_HSC_RESERVED_3 = 47,
314    AIS_TYPE_HSC_RESERVED_4 = 48,
315    AIS_TYPE_HSC_UNKNOWN = 49,
316    AIS_TYPE_PILOT = 50,
317    #[doc = "Search And Rescue vessel."]
318    AIS_TYPE_SAR = 51,
319    AIS_TYPE_TUG = 52,
320    AIS_TYPE_PORT_TENDER = 53,
321    #[doc = "Anti-pollution equipment."]
322    AIS_TYPE_ANTI_POLLUTION = 54,
323    AIS_TYPE_LAW_ENFORCEMENT = 55,
324    AIS_TYPE_SPARE_LOCAL_1 = 56,
325    AIS_TYPE_SPARE_LOCAL_2 = 57,
326    AIS_TYPE_MEDICAL_TRANSPORT = 58,
327    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
328    AIS_TYPE_NONECOMBATANT = 59,
329    AIS_TYPE_PASSENGER = 60,
330    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
331    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
332    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
333    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
334    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
335    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
336    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
337    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
338    AIS_TYPE_PASSENGER_UNKNOWN = 69,
339    AIS_TYPE_CARGO = 70,
340    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
341    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
342    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
343    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
344    AIS_TYPE_CARGO_RESERVED_1 = 75,
345    AIS_TYPE_CARGO_RESERVED_2 = 76,
346    AIS_TYPE_CARGO_RESERVED_3 = 77,
347    AIS_TYPE_CARGO_RESERVED_4 = 78,
348    AIS_TYPE_CARGO_UNKNOWN = 79,
349    AIS_TYPE_TANKER = 80,
350    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
351    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
352    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
353    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
354    AIS_TYPE_TANKER_RESERVED_1 = 85,
355    AIS_TYPE_TANKER_RESERVED_2 = 86,
356    AIS_TYPE_TANKER_RESERVED_3 = 87,
357    AIS_TYPE_TANKER_RESERVED_4 = 88,
358    AIS_TYPE_TANKER_UNKNOWN = 89,
359    AIS_TYPE_OTHER = 90,
360    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
361    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
362    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
363    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
364    AIS_TYPE_OTHER_RESERVED_1 = 95,
365    AIS_TYPE_OTHER_RESERVED_2 = 96,
366    AIS_TYPE_OTHER_RESERVED_3 = 97,
367    AIS_TYPE_OTHER_RESERVED_4 = 98,
368    AIS_TYPE_OTHER_UNKNOWN = 99,
369}
370impl AisType {
371    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
372}
373impl Default for AisType {
374    fn default() -> Self {
375        Self::DEFAULT
376    }
377}
378bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
379impl AttitudeTargetTypemask {
380    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
381}
382impl Default for AttitudeTargetTypemask {
383    fn default() -> Self {
384        Self::DEFAULT
385    }
386}
387#[cfg_attr(feature = "ts", derive(TS))]
388#[cfg_attr(feature = "ts", ts(export))]
389#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
390#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
391#[cfg_attr(feature = "serde", serde(tag = "type"))]
392#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
393#[repr(u32)]
394#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
395pub enum AutotuneAxis {
396    #[doc = "Autotune roll axis."]
397    AUTOTUNE_AXIS_ROLL = 1,
398    #[doc = "Autotune pitch axis."]
399    AUTOTUNE_AXIS_PITCH = 2,
400    #[doc = "Autotune yaw axis."]
401    AUTOTUNE_AXIS_YAW = 4,
402}
403impl AutotuneAxis {
404    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
405}
406impl Default for AutotuneAxis {
407    fn default() -> Self {
408        Self::DEFAULT
409    }
410}
411bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
412impl CameraCapFlags {
413    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
414}
415impl Default for CameraCapFlags {
416    fn default() -> Self {
417        Self::DEFAULT
418    }
419}
420#[cfg_attr(feature = "ts", derive(TS))]
421#[cfg_attr(feature = "ts", ts(export))]
422#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
423#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
424#[cfg_attr(feature = "serde", serde(tag = "type"))]
425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
426#[repr(u32)]
427#[doc = "Camera Modes."]
428pub enum CameraMode {
429    #[doc = "Camera is in image/photo capture mode."]
430    CAMERA_MODE_IMAGE = 0,
431    #[doc = "Camera is in video capture mode."]
432    CAMERA_MODE_VIDEO = 1,
433    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
434    CAMERA_MODE_IMAGE_SURVEY = 2,
435}
436impl CameraMode {
437    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
438}
439impl Default for CameraMode {
440    fn default() -> Self {
441        Self::DEFAULT
442    }
443}
444#[cfg_attr(feature = "ts", derive(TS))]
445#[cfg_attr(feature = "ts", ts(export))]
446#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
448#[cfg_attr(feature = "serde", serde(tag = "type"))]
449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
450#[repr(u32)]
451#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
452pub enum CameraSource {
453    #[doc = "Default camera source."]
454    CAMERA_SOURCE_DEFAULT = 0,
455    #[doc = "RGB camera source."]
456    CAMERA_SOURCE_RGB = 1,
457    #[doc = "IR camera source."]
458    CAMERA_SOURCE_IR = 2,
459    #[doc = "NDVI camera source."]
460    CAMERA_SOURCE_NDVI = 3,
461}
462impl CameraSource {
463    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
464}
465impl Default for CameraSource {
466    fn default() -> Self {
467        Self::DEFAULT
468    }
469}
470#[cfg_attr(feature = "ts", derive(TS))]
471#[cfg_attr(feature = "ts", ts(export))]
472#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
474#[cfg_attr(feature = "serde", serde(tag = "type"))]
475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
476#[repr(u32)]
477#[doc = "Camera tracking modes"]
478pub enum CameraTrackingMode {
479    #[doc = "Not tracking"]
480    CAMERA_TRACKING_MODE_NONE = 0,
481    #[doc = "Target is a point"]
482    CAMERA_TRACKING_MODE_POINT = 1,
483    #[doc = "Target is a rectangle"]
484    CAMERA_TRACKING_MODE_RECTANGLE = 2,
485}
486impl CameraTrackingMode {
487    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
488}
489impl Default for CameraTrackingMode {
490    fn default() -> Self {
491        Self::DEFAULT
492    }
493}
494#[cfg_attr(feature = "ts", derive(TS))]
495#[cfg_attr(feature = "ts", ts(export))]
496#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
498#[cfg_attr(feature = "serde", serde(tag = "type"))]
499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
500#[repr(u32)]
501#[doc = "Camera tracking status flags"]
502pub enum CameraTrackingStatusFlags {
503    #[doc = "Camera is not tracking"]
504    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
505    #[doc = "Camera is tracking"]
506    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
507    #[doc = "Camera tracking in error state"]
508    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
509}
510impl CameraTrackingStatusFlags {
511    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
512}
513impl Default for CameraTrackingStatusFlags {
514    fn default() -> Self {
515        Self::DEFAULT
516    }
517}
518bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
519impl CameraTrackingTargetData {
520    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
521}
522impl Default for CameraTrackingTargetData {
523    fn default() -> Self {
524        Self::DEFAULT
525    }
526}
527#[cfg_attr(feature = "ts", derive(TS))]
528#[cfg_attr(feature = "ts", ts(export))]
529#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
531#[cfg_attr(feature = "serde", serde(tag = "type"))]
532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
533#[repr(u32)]
534#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
535pub enum CameraZoomType {
536    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
537    ZOOM_TYPE_STEP = 0,
538    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
539    ZOOM_TYPE_CONTINUOUS = 1,
540    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
541    ZOOM_TYPE_RANGE = 2,
542    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
543    ZOOM_TYPE_FOCAL_LENGTH = 3,
544    #[doc = "Zoom value as horizontal field of view in degrees."]
545    ZOOM_TYPE_HORIZONTAL_FOV = 4,
546}
547impl CameraZoomType {
548    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
549}
550impl Default for CameraZoomType {
551    fn default() -> Self {
552        Self::DEFAULT
553    }
554}
555#[cfg_attr(feature = "ts", derive(TS))]
556#[cfg_attr(feature = "ts", ts(export))]
557#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
558#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
559#[cfg_attr(feature = "serde", serde(tag = "type"))]
560#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
561#[repr(u32)]
562pub enum CanFilterOp {
563    CAN_FILTER_REPLACE = 0,
564    CAN_FILTER_ADD = 1,
565    CAN_FILTER_REMOVE = 2,
566}
567impl CanFilterOp {
568    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
569}
570impl Default for CanFilterOp {
571    fn default() -> Self {
572        Self::DEFAULT
573    }
574}
575#[cfg_attr(feature = "ts", derive(TS))]
576#[cfg_attr(feature = "ts", ts(export))]
577#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
578#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
579#[cfg_attr(feature = "serde", serde(tag = "type"))]
580#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
581#[repr(u32)]
582#[doc = "Possible responses from a CELLULAR_CONFIG message."]
583pub enum CellularConfigResponse {
584    #[doc = "Changes accepted."]
585    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
586    #[doc = "Invalid APN."]
587    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
588    #[doc = "Invalid PIN."]
589    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
590    #[doc = "Changes rejected."]
591    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
592    #[doc = "PUK is required to unblock SIM card."]
593    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
594}
595impl CellularConfigResponse {
596    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
597}
598impl Default for CellularConfigResponse {
599    fn default() -> Self {
600        Self::DEFAULT
601    }
602}
603#[cfg_attr(feature = "ts", derive(TS))]
604#[cfg_attr(feature = "ts", ts(export))]
605#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
606#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
607#[cfg_attr(feature = "serde", serde(tag = "type"))]
608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
609#[repr(u32)]
610#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
611pub enum CellularNetworkFailedReason {
612    #[doc = "No error"]
613    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
614    #[doc = "Error state is unknown"]
615    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
616    #[doc = "SIM is required for the modem but missing"]
617    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
618    #[doc = "SIM is available, but not usable for connection"]
619    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
620}
621impl CellularNetworkFailedReason {
622    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
623}
624impl Default for CellularNetworkFailedReason {
625    fn default() -> Self {
626        Self::DEFAULT
627    }
628}
629#[cfg_attr(feature = "ts", derive(TS))]
630#[cfg_attr(feature = "ts", ts(export))]
631#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
632#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
633#[cfg_attr(feature = "serde", serde(tag = "type"))]
634#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
635#[repr(u32)]
636#[doc = "Cellular network radio type"]
637pub enum CellularNetworkRadioType {
638    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
639    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
640    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
641    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
642    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
643}
644impl CellularNetworkRadioType {
645    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
646}
647impl Default for CellularNetworkRadioType {
648    fn default() -> Self {
649        Self::DEFAULT
650    }
651}
652#[cfg_attr(feature = "ts", derive(TS))]
653#[cfg_attr(feature = "ts", ts(export))]
654#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
656#[cfg_attr(feature = "serde", serde(tag = "type"))]
657#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
658#[repr(u32)]
659#[doc = "These flags encode the cellular network status"]
660pub enum CellularStatusFlag {
661    #[doc = "State unknown or not reportable."]
662    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
663    #[doc = "Modem is unusable"]
664    CELLULAR_STATUS_FLAG_FAILED = 1,
665    #[doc = "Modem is being initialized"]
666    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
667    #[doc = "Modem is locked"]
668    CELLULAR_STATUS_FLAG_LOCKED = 3,
669    #[doc = "Modem is not enabled and is powered down"]
670    CELLULAR_STATUS_FLAG_DISABLED = 4,
671    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
672    CELLULAR_STATUS_FLAG_DISABLING = 5,
673    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
674    CELLULAR_STATUS_FLAG_ENABLING = 6,
675    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
676    CELLULAR_STATUS_FLAG_ENABLED = 7,
677    #[doc = "Modem is searching for a network provider to register"]
678    CELLULAR_STATUS_FLAG_SEARCHING = 8,
679    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
680    CELLULAR_STATUS_FLAG_REGISTERED = 9,
681    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
682    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
683    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
684    CELLULAR_STATUS_FLAG_CONNECTING = 11,
685    #[doc = "One or more packet data bearers is active and connected"]
686    CELLULAR_STATUS_FLAG_CONNECTED = 12,
687}
688impl CellularStatusFlag {
689    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
690}
691impl Default for CellularStatusFlag {
692    fn default() -> Self {
693        Self::DEFAULT
694    }
695}
696#[cfg_attr(feature = "ts", derive(TS))]
697#[cfg_attr(feature = "ts", ts(export))]
698#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
699#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
700#[cfg_attr(feature = "serde", serde(tag = "type"))]
701#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
702#[repr(u32)]
703#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
704pub enum CompMetadataType {
705    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
706    COMP_METADATA_TYPE_GENERAL = 0,
707    #[doc = "Parameter meta data."]
708    COMP_METADATA_TYPE_PARAMETER = 1,
709    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
710    COMP_METADATA_TYPE_COMMANDS = 2,
711    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
712    COMP_METADATA_TYPE_PERIPHERALS = 3,
713    #[doc = "Meta data for the events interface."]
714    COMP_METADATA_TYPE_EVENTS = 4,
715    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
716    COMP_METADATA_TYPE_ACTUATORS = 5,
717}
718impl CompMetadataType {
719    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
720}
721impl Default for CompMetadataType {
722    fn default() -> Self {
723        Self::DEFAULT
724    }
725}
726#[cfg_attr(feature = "ts", derive(TS))]
727#[cfg_attr(feature = "ts", ts(export))]
728#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
730#[cfg_attr(feature = "serde", serde(tag = "type"))]
731#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
732#[repr(u32)]
733#[doc = "Indicates the ESC connection type."]
734pub enum EscConnectionType {
735    #[doc = "Traditional PPM ESC."]
736    ESC_CONNECTION_TYPE_PPM = 0,
737    #[doc = "Serial Bus connected ESC."]
738    ESC_CONNECTION_TYPE_SERIAL = 1,
739    #[doc = "One Shot PPM ESC."]
740    ESC_CONNECTION_TYPE_ONESHOT = 2,
741    #[doc = "I2C ESC."]
742    ESC_CONNECTION_TYPE_I2C = 3,
743    #[doc = "CAN-Bus ESC."]
744    ESC_CONNECTION_TYPE_CAN = 4,
745    #[doc = "DShot ESC."]
746    ESC_CONNECTION_TYPE_DSHOT = 5,
747}
748impl EscConnectionType {
749    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
750}
751impl Default for EscConnectionType {
752    fn default() -> Self {
753        Self::DEFAULT
754    }
755}
756bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
757impl EscFailureFlags {
758    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
759}
760impl Default for EscFailureFlags {
761    fn default() -> Self {
762        Self::DEFAULT
763    }
764}
765bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
766impl EstimatorStatusFlags {
767    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
768}
769impl Default for EstimatorStatusFlags {
770    fn default() -> Self {
771        Self::DEFAULT
772    }
773}
774#[cfg_attr(feature = "ts", derive(TS))]
775#[cfg_attr(feature = "ts", ts(export))]
776#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
777#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
778#[cfg_attr(feature = "serde", serde(tag = "type"))]
779#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
780#[repr(u32)]
781#[doc = "List of possible failure type to inject."]
782pub enum FailureType {
783    #[doc = "No failure injected, used to reset a previous failure."]
784    FAILURE_TYPE_OK = 0,
785    #[doc = "Sets unit off, so completely non-responsive."]
786    FAILURE_TYPE_OFF = 1,
787    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
788    FAILURE_TYPE_STUCK = 2,
789    #[doc = "Unit is reporting complete garbage."]
790    FAILURE_TYPE_GARBAGE = 3,
791    #[doc = "Unit is consistently wrong."]
792    FAILURE_TYPE_WRONG = 4,
793    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
794    FAILURE_TYPE_SLOW = 5,
795    #[doc = "Data of unit is delayed in time."]
796    FAILURE_TYPE_DELAYED = 6,
797    #[doc = "Unit is sometimes working, sometimes not."]
798    FAILURE_TYPE_INTERMITTENT = 7,
799}
800impl FailureType {
801    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
802}
803impl Default for FailureType {
804    fn default() -> Self {
805        Self::DEFAULT
806    }
807}
808#[cfg_attr(feature = "ts", derive(TS))]
809#[cfg_attr(feature = "ts", ts(export))]
810#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
812#[cfg_attr(feature = "serde", serde(tag = "type"))]
813#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
814#[repr(u32)]
815#[doc = "List of possible units where failures can be injected."]
816pub enum FailureUnit {
817    FAILURE_UNIT_SENSOR_GYRO = 0,
818    FAILURE_UNIT_SENSOR_ACCEL = 1,
819    FAILURE_UNIT_SENSOR_MAG = 2,
820    FAILURE_UNIT_SENSOR_BARO = 3,
821    FAILURE_UNIT_SENSOR_GPS = 4,
822    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
823    FAILURE_UNIT_SENSOR_VIO = 6,
824    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
825    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
826    FAILURE_UNIT_SYSTEM_BATTERY = 100,
827    FAILURE_UNIT_SYSTEM_MOTOR = 101,
828    FAILURE_UNIT_SYSTEM_SERVO = 102,
829    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
830    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
831    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
832}
833impl FailureUnit {
834    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
835}
836impl Default for FailureUnit {
837    fn default() -> Self {
838        Self::DEFAULT
839    }
840}
841#[cfg_attr(feature = "ts", derive(TS))]
842#[cfg_attr(feature = "ts", ts(export))]
843#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
844#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
845#[cfg_attr(feature = "serde", serde(tag = "type"))]
846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
847#[repr(u32)]
848pub enum FenceBreach {
849    #[doc = "No last fence breach"]
850    FENCE_BREACH_NONE = 0,
851    #[doc = "Breached minimum altitude"]
852    FENCE_BREACH_MINALT = 1,
853    #[doc = "Breached maximum altitude"]
854    FENCE_BREACH_MAXALT = 2,
855    #[doc = "Breached fence boundary"]
856    FENCE_BREACH_BOUNDARY = 3,
857}
858impl FenceBreach {
859    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
860}
861impl Default for FenceBreach {
862    fn default() -> Self {
863        Self::DEFAULT
864    }
865}
866#[cfg_attr(feature = "ts", derive(TS))]
867#[cfg_attr(feature = "ts", ts(export))]
868#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
869#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
870#[cfg_attr(feature = "serde", serde(tag = "type"))]
871#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
872#[repr(u32)]
873#[doc = "Actions being taken to mitigate/prevent fence breach"]
874pub enum FenceMitigate {
875    #[doc = "Unknown"]
876    FENCE_MITIGATE_UNKNOWN = 0,
877    #[doc = "No actions being taken"]
878    FENCE_MITIGATE_NONE = 1,
879    #[doc = "Velocity limiting active to prevent breach"]
880    FENCE_MITIGATE_VEL_LIMIT = 2,
881}
882impl FenceMitigate {
883    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
884}
885impl Default for FenceMitigate {
886    fn default() -> Self {
887        Self::DEFAULT
888    }
889}
890#[cfg_attr(feature = "ts", derive(TS))]
891#[cfg_attr(feature = "ts", ts(export))]
892#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
893#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
894#[cfg_attr(feature = "serde", serde(tag = "type"))]
895#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
896#[repr(u32)]
897#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
898pub enum FenceType {
899    #[doc = "Maximum altitude fence"]
900    FENCE_TYPE_ALT_MAX = 1,
901    #[doc = "Circle fence"]
902    FENCE_TYPE_CIRCLE = 2,
903    #[doc = "Polygon fence"]
904    FENCE_TYPE_POLYGON = 4,
905    #[doc = "Minimum altitude fence"]
906    FENCE_TYPE_ALT_MIN = 8,
907}
908impl FenceType {
909    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
910}
911impl Default for FenceType {
912    fn default() -> Self {
913        Self::DEFAULT
914    }
915}
916#[cfg_attr(feature = "ts", derive(TS))]
917#[cfg_attr(feature = "ts", ts(export))]
918#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
920#[cfg_attr(feature = "serde", serde(tag = "type"))]
921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
922#[repr(u32)]
923#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
924pub enum FirmwareVersionType {
925    #[doc = "development release"]
926    FIRMWARE_VERSION_TYPE_DEV = 0,
927    #[doc = "alpha release"]
928    FIRMWARE_VERSION_TYPE_ALPHA = 64,
929    #[doc = "beta release"]
930    FIRMWARE_VERSION_TYPE_BETA = 128,
931    #[doc = "release candidate"]
932    FIRMWARE_VERSION_TYPE_RC = 192,
933    #[doc = "official stable release"]
934    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
935}
936impl FirmwareVersionType {
937    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
938}
939impl Default for FirmwareVersionType {
940    fn default() -> Self {
941        Self::DEFAULT
942    }
943}
944bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
945impl GimbalDeviceCapFlags {
946    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
947}
948impl Default for GimbalDeviceCapFlags {
949    fn default() -> Self {
950        Self::DEFAULT
951    }
952}
953bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
954impl GimbalDeviceErrorFlags {
955    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
956}
957impl Default for GimbalDeviceErrorFlags {
958    fn default() -> Self {
959        Self::DEFAULT
960    }
961}
962bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
963impl GimbalDeviceFlags {
964    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
965}
966impl Default for GimbalDeviceFlags {
967    fn default() -> Self {
968        Self::DEFAULT
969    }
970}
971bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
972impl GimbalManagerCapFlags {
973    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
974}
975impl Default for GimbalManagerCapFlags {
976    fn default() -> Self {
977        Self::DEFAULT
978    }
979}
980bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
981impl GimbalManagerFlags {
982    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
983}
984impl Default for GimbalManagerFlags {
985    fn default() -> Self {
986        Self::DEFAULT
987    }
988}
989#[cfg_attr(feature = "ts", derive(TS))]
990#[cfg_attr(feature = "ts", ts(export))]
991#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
993#[cfg_attr(feature = "serde", serde(tag = "type"))]
994#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
995#[repr(u32)]
996#[doc = "Type of GPS fix"]
997pub enum GpsFixType {
998    #[doc = "No GPS connected"]
999    GPS_FIX_TYPE_NO_GPS = 0,
1000    #[doc = "No position information, GPS is connected"]
1001    GPS_FIX_TYPE_NO_FIX = 1,
1002    #[doc = "2D position"]
1003    GPS_FIX_TYPE_2D_FIX = 2,
1004    #[doc = "3D position"]
1005    GPS_FIX_TYPE_3D_FIX = 3,
1006    #[doc = "DGPS/SBAS aided 3D position"]
1007    GPS_FIX_TYPE_DGPS = 4,
1008    #[doc = "RTK float, 3D position"]
1009    GPS_FIX_TYPE_RTK_FLOAT = 5,
1010    #[doc = "RTK Fixed, 3D position"]
1011    GPS_FIX_TYPE_RTK_FIXED = 6,
1012    #[doc = "Static fixed, typically used for base stations"]
1013    GPS_FIX_TYPE_STATIC = 7,
1014    #[doc = "PPP, 3D position."]
1015    GPS_FIX_TYPE_PPP = 8,
1016}
1017impl GpsFixType {
1018    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1019}
1020impl Default for GpsFixType {
1021    fn default() -> Self {
1022        Self::DEFAULT
1023    }
1024}
1025bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1026impl GpsInputIgnoreFlags {
1027    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1028}
1029impl Default for GpsInputIgnoreFlags {
1030    fn default() -> Self {
1031        Self::DEFAULT
1032    }
1033}
1034#[cfg_attr(feature = "ts", derive(TS))]
1035#[cfg_attr(feature = "ts", ts(export))]
1036#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1037#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1038#[cfg_attr(feature = "serde", serde(tag = "type"))]
1039#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1040#[repr(u32)]
1041#[doc = "Gripper actions."]
1042pub enum GripperActions {
1043    #[doc = "Gripper release cargo."]
1044    GRIPPER_ACTION_RELEASE = 0,
1045    #[doc = "Gripper grab onto cargo."]
1046    GRIPPER_ACTION_GRAB = 1,
1047}
1048impl GripperActions {
1049    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1050}
1051impl Default for GripperActions {
1052    fn default() -> Self {
1053        Self::DEFAULT
1054    }
1055}
1056bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1057impl HighresImuUpdatedFlags {
1058    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1059}
1060impl Default for HighresImuUpdatedFlags {
1061    fn default() -> Self {
1062        Self::DEFAULT
1063    }
1064}
1065bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1066impl HilActuatorControlsFlags {
1067    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1068}
1069impl Default for HilActuatorControlsFlags {
1070    fn default() -> Self {
1071        Self::DEFAULT
1072    }
1073}
1074bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1075impl HilSensorUpdatedFlags {
1076    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1077}
1078impl Default for HilSensorUpdatedFlags {
1079    fn default() -> Self {
1080        Self::DEFAULT
1081    }
1082}
1083bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1084impl HlFailureFlag {
1085    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1086}
1087impl Default for HlFailureFlag {
1088    fn default() -> Self {
1089        Self::DEFAULT
1090    }
1091}
1092bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1093impl IlluminatorErrorFlags {
1094    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1095}
1096impl Default for IlluminatorErrorFlags {
1097    fn default() -> Self {
1098        Self::DEFAULT
1099    }
1100}
1101#[cfg_attr(feature = "ts", derive(TS))]
1102#[cfg_attr(feature = "ts", ts(export))]
1103#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1104#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1105#[cfg_attr(feature = "serde", serde(tag = "type"))]
1106#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1107#[repr(u32)]
1108#[doc = "Modes of illuminator"]
1109pub enum IlluminatorMode {
1110    #[doc = "Illuminator mode is not specified/unknown"]
1111    ILLUMINATOR_MODE_UNKNOWN = 0,
1112    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1113    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1114    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1115    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1116}
1117impl IlluminatorMode {
1118    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1119}
1120impl Default for IlluminatorMode {
1121    fn default() -> Self {
1122        Self::DEFAULT
1123    }
1124}
1125#[cfg_attr(feature = "ts", derive(TS))]
1126#[cfg_attr(feature = "ts", ts(export))]
1127#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1128#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1129#[cfg_attr(feature = "serde", serde(tag = "type"))]
1130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1131#[repr(u32)]
1132#[doc = "Type of landing target"]
1133pub enum LandingTargetType {
1134    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1135    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1136    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1137    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1138    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1139    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1140    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1141    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1142}
1143impl LandingTargetType {
1144    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1145}
1146impl Default for LandingTargetType {
1147    fn default() -> Self {
1148        Self::DEFAULT
1149    }
1150}
1151#[cfg_attr(feature = "ts", derive(TS))]
1152#[cfg_attr(feature = "ts", ts(export))]
1153#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1155#[cfg_attr(feature = "serde", serde(tag = "type"))]
1156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1157#[repr(u32)]
1158pub enum MagCalStatus {
1159    MAG_CAL_NOT_STARTED = 0,
1160    MAG_CAL_WAITING_TO_START = 1,
1161    MAG_CAL_RUNNING_STEP_ONE = 2,
1162    MAG_CAL_RUNNING_STEP_TWO = 3,
1163    MAG_CAL_SUCCESS = 4,
1164    MAG_CAL_FAILED = 5,
1165    MAG_CAL_BAD_ORIENTATION = 6,
1166    MAG_CAL_BAD_RADIUS = 7,
1167}
1168impl MagCalStatus {
1169    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1170}
1171impl Default for MagCalStatus {
1172    fn default() -> Self {
1173        Self::DEFAULT
1174    }
1175}
1176#[cfg_attr(feature = "ts", derive(TS))]
1177#[cfg_attr(feature = "ts", ts(export))]
1178#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1179#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1180#[cfg_attr(feature = "serde", serde(tag = "type"))]
1181#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1182#[repr(u32)]
1183pub enum MavArmAuthDeniedReason {
1184    #[doc = "Not a specific reason"]
1185    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1186    #[doc = "Authorizer will send the error as string to GCS"]
1187    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1188    #[doc = "At least one waypoint have a invalid value"]
1189    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1190    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1191    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1192    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1193    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1194    #[doc = "Weather is not good to fly"]
1195    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1196}
1197impl MavArmAuthDeniedReason {
1198    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1199}
1200impl Default for MavArmAuthDeniedReason {
1201    fn default() -> Self {
1202        Self::DEFAULT
1203    }
1204}
1205#[cfg_attr(feature = "ts", derive(TS))]
1206#[cfg_attr(feature = "ts", ts(export))]
1207#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1208#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1209#[cfg_attr(feature = "serde", serde(tag = "type"))]
1210#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1211#[repr(u32)]
1212#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1213pub enum MavAutopilot {
1214    #[doc = "Generic autopilot, full support for everything"]
1215    MAV_AUTOPILOT_GENERIC = 0,
1216    #[doc = "Reserved for future use."]
1217    MAV_AUTOPILOT_RESERVED = 1,
1218    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1219    MAV_AUTOPILOT_SLUGS = 2,
1220    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1221    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1222    #[doc = "OpenPilot, <http://openpilot.org>"]
1223    MAV_AUTOPILOT_OPENPILOT = 4,
1224    #[doc = "Generic autopilot only supporting simple waypoints"]
1225    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1226    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1227    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1228    #[doc = "Generic autopilot supporting the full mission command set"]
1229    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1230    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1231    MAV_AUTOPILOT_INVALID = 8,
1232    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1233    MAV_AUTOPILOT_PPZ = 9,
1234    #[doc = "UAV Dev Board"]
1235    MAV_AUTOPILOT_UDB = 10,
1236    #[doc = "FlexiPilot"]
1237    MAV_AUTOPILOT_FP = 11,
1238    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1239    MAV_AUTOPILOT_PX4 = 12,
1240    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1241    MAV_AUTOPILOT_SMACCMPILOT = 13,
1242    #[doc = "AutoQuad -- <http://autoquad.org>"]
1243    MAV_AUTOPILOT_AUTOQUAD = 14,
1244    #[doc = "Armazila -- <http://armazila.com>"]
1245    MAV_AUTOPILOT_ARMAZILA = 15,
1246    #[doc = "Aerob -- <http://aerob.ru>"]
1247    MAV_AUTOPILOT_AEROB = 16,
1248    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1249    MAV_AUTOPILOT_ASLUAV = 17,
1250    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1251    MAV_AUTOPILOT_SMARTAP = 18,
1252    #[doc = "AirRails - <http://uaventure.com>"]
1253    MAV_AUTOPILOT_AIRRAILS = 19,
1254    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1255    MAV_AUTOPILOT_REFLEX = 20,
1256}
1257impl MavAutopilot {
1258    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1259}
1260impl Default for MavAutopilot {
1261    fn default() -> Self {
1262        Self::DEFAULT
1263    }
1264}
1265#[cfg_attr(feature = "ts", derive(TS))]
1266#[cfg_attr(feature = "ts", ts(export))]
1267#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1268#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1269#[cfg_attr(feature = "serde", serde(tag = "type"))]
1270#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1271#[repr(u32)]
1272#[doc = "Enumeration for battery charge states."]
1273pub enum MavBatteryChargeState {
1274    #[doc = "Low battery state is not provided"]
1275    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1276    #[doc = "Battery is not in low state. Normal operation."]
1277    MAV_BATTERY_CHARGE_STATE_OK = 1,
1278    #[doc = "Battery state is low, warn and monitor close."]
1279    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1280    #[doc = "Battery state is critical, return or abort immediately."]
1281    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1282    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1283    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1284    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1285    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1286    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1287    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1288    #[doc = "Battery is charging."]
1289    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1290}
1291impl MavBatteryChargeState {
1292    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1293}
1294impl Default for MavBatteryChargeState {
1295    fn default() -> Self {
1296        Self::DEFAULT
1297    }
1298}
1299bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1300impl MavBatteryFault {
1301    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1302}
1303impl Default for MavBatteryFault {
1304    fn default() -> Self {
1305        Self::DEFAULT
1306    }
1307}
1308#[cfg_attr(feature = "ts", derive(TS))]
1309#[cfg_attr(feature = "ts", ts(export))]
1310#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1312#[cfg_attr(feature = "serde", serde(tag = "type"))]
1313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1314#[repr(u32)]
1315#[doc = "Enumeration of battery functions"]
1316pub enum MavBatteryFunction {
1317    #[doc = "Battery function is unknown"]
1318    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1319    #[doc = "Battery supports all flight systems"]
1320    MAV_BATTERY_FUNCTION_ALL = 1,
1321    #[doc = "Battery for the propulsion system"]
1322    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1323    #[doc = "Avionics battery"]
1324    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1325    #[doc = "Payload battery"]
1326    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1327}
1328impl MavBatteryFunction {
1329    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1330}
1331impl Default for MavBatteryFunction {
1332    fn default() -> Self {
1333        Self::DEFAULT
1334    }
1335}
1336#[cfg_attr(feature = "ts", derive(TS))]
1337#[cfg_attr(feature = "ts", ts(export))]
1338#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1340#[cfg_attr(feature = "serde", serde(tag = "type"))]
1341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1342#[repr(u32)]
1343#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1344pub enum MavBatteryMode {
1345    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1346    MAV_BATTERY_MODE_UNKNOWN = 0,
1347    #[doc = "Battery is auto discharging (towards storage level)."]
1348    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1349    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1350    MAV_BATTERY_MODE_HOT_SWAP = 2,
1351}
1352impl MavBatteryMode {
1353    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1354}
1355impl Default for MavBatteryMode {
1356    fn default() -> Self {
1357        Self::DEFAULT
1358    }
1359}
1360#[cfg_attr(feature = "ts", derive(TS))]
1361#[cfg_attr(feature = "ts", ts(export))]
1362#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1364#[cfg_attr(feature = "serde", serde(tag = "type"))]
1365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1366#[repr(u32)]
1367#[doc = "Enumeration of battery types"]
1368pub enum MavBatteryType {
1369    #[doc = "Not specified."]
1370    MAV_BATTERY_TYPE_UNKNOWN = 0,
1371    #[doc = "Lithium polymer battery"]
1372    MAV_BATTERY_TYPE_LIPO = 1,
1373    #[doc = "Lithium-iron-phosphate battery"]
1374    MAV_BATTERY_TYPE_LIFE = 2,
1375    #[doc = "Lithium-ION battery"]
1376    MAV_BATTERY_TYPE_LION = 3,
1377    #[doc = "Nickel metal hydride battery"]
1378    MAV_BATTERY_TYPE_NIMH = 4,
1379}
1380impl MavBatteryType {
1381    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1382}
1383impl Default for MavBatteryType {
1384    fn default() -> Self {
1385        Self::DEFAULT
1386    }
1387}
1388#[cfg_attr(feature = "ts", derive(TS))]
1389#[cfg_attr(feature = "ts", ts(export))]
1390#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1391#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1392#[cfg_attr(feature = "serde", serde(tag = "type"))]
1393#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1394#[repr(u32)]
1395#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1396pub enum MavCmd {
1397    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1398    MAV_CMD_NAV_WAYPOINT = 16,
1399    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1400    MAV_CMD_NAV_LOITER_UNLIM = 17,
1401    #[doc = "Loiter around this waypoint for X turns"]
1402    MAV_CMD_NAV_LOITER_TURNS = 18,
1403    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1404    MAV_CMD_NAV_LOITER_TIME = 19,
1405    #[doc = "Return to launch location"]
1406    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1407    #[doc = "Land at location."]
1408    MAV_CMD_NAV_LAND = 21,
1409    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1410    MAV_CMD_NAV_TAKEOFF = 22,
1411    #[doc = "Land at local position (local frame only)"]
1412    MAV_CMD_NAV_LAND_LOCAL = 23,
1413    #[doc = "Takeoff from local position (local frame only)"]
1414    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1415    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1416    MAV_CMD_NAV_FOLLOW = 25,
1417    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1418    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1419    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1420    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1421    #[doc = "Begin following a target"]
1422    MAV_CMD_DO_FOLLOW = 32,
1423    #[doc = "Reposition the MAV after a follow target command has been sent"]
1424    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1425    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1426    MAV_CMD_DO_ORBIT = 34,
1427    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1428    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1429    MAV_CMD_NAV_ROI = 80,
1430    #[doc = "Control autonomous path planning on the MAV."]
1431    MAV_CMD_NAV_PATHPLANNING = 81,
1432    #[doc = "Navigate to waypoint using a spline path."]
1433    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1434    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1435    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1436    #[doc = "Land using VTOL mode"]
1437    MAV_CMD_NAV_VTOL_LAND = 85,
1438    #[doc = "hand control over to an external controller"]
1439    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1440    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1441    MAV_CMD_NAV_DELAY = 93,
1442    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1443    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1444    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1445    MAV_CMD_NAV_LAST = 95,
1446    #[doc = "Delay mission state machine."]
1447    MAV_CMD_CONDITION_DELAY = 112,
1448    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1449    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1450    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1451    MAV_CMD_CONDITION_DISTANCE = 114,
1452    #[doc = "Reach a certain target angle."]
1453    MAV_CMD_CONDITION_YAW = 115,
1454    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1455    MAV_CMD_CONDITION_LAST = 159,
1456    #[doc = "Set system mode."]
1457    MAV_CMD_DO_SET_MODE = 176,
1458    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1459    MAV_CMD_DO_JUMP = 177,
1460    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1461    MAV_CMD_DO_CHANGE_SPEED = 178,
1462    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1463    MAV_CMD_DO_SET_HOME = 179,
1464    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1465    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1466    MAV_CMD_DO_SET_PARAMETER = 180,
1467    #[doc = "Set a relay to a condition."]
1468    MAV_CMD_DO_SET_RELAY = 181,
1469    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1470    MAV_CMD_DO_REPEAT_RELAY = 182,
1471    #[doc = "Set a servo to a desired PWM value."]
1472    MAV_CMD_DO_SET_SERVO = 183,
1473    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1474    MAV_CMD_DO_REPEAT_SERVO = 184,
1475    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1476    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1477    #[doc = "Change altitude set point."]
1478    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1479    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1480    MAV_CMD_DO_SET_ACTUATOR = 187,
1481    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1482    MAV_CMD_DO_RETURN_PATH_START = 188,
1483    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1484    MAV_CMD_DO_LAND_START = 189,
1485    #[doc = "Mission command to perform a landing from a rally point."]
1486    MAV_CMD_DO_RALLY_LAND = 190,
1487    #[doc = "Mission command to safely abort an autonomous landing."]
1488    MAV_CMD_DO_GO_AROUND = 191,
1489    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1490    MAV_CMD_DO_REPOSITION = 192,
1491    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1492    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1493    #[doc = "Set moving direction to forward or reverse."]
1494    MAV_CMD_DO_SET_REVERSE = 194,
1495    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1496    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1497    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1498    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1499    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1500    MAV_CMD_DO_SET_ROI_NONE = 197,
1501    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1502    MAV_CMD_DO_SET_ROI_SYSID = 198,
1503    #[doc = "Control onboard camera system."]
1504    MAV_CMD_DO_CONTROL_VIDEO = 200,
1505    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1506    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1507    MAV_CMD_DO_SET_ROI = 201,
1508    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1509    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1510    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1511    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1512    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1513    #[doc = "Mission command to configure a camera or antenna mount"]
1514    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1515    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1516    #[doc = "Mission command to control a camera or antenna mount"]
1517    MAV_CMD_DO_MOUNT_CONTROL = 205,
1518    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1519    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1520    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1521    MAV_CMD_DO_FENCE_ENABLE = 207,
1522    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1523    MAV_CMD_DO_PARACHUTE = 208,
1524    #[doc = "Command to perform motor test."]
1525    MAV_CMD_DO_MOTOR_TEST = 209,
1526    #[doc = "Change to/from inverted flight."]
1527    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1528    #[doc = "Mission command to operate a gripper."]
1529    MAV_CMD_DO_GRIPPER = 211,
1530    #[doc = "Enable/disable autotune."]
1531    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1532    #[doc = "Sets a desired vehicle turn angle and speed change."]
1533    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1534    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1535    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1536    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1537    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1538    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1539    #[doc = "set id of master controller"]
1540    MAV_CMD_DO_GUIDED_MASTER = 221,
1541    #[doc = "Set limits for external control"]
1542    MAV_CMD_DO_GUIDED_LIMITS = 222,
1543    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1544    MAV_CMD_DO_ENGINE_CONTROL = 223,
1545    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1546    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1547    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1548    MAV_CMD_DO_LAST = 240,
1549    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1550    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1551    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1552    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1553    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1554    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1555    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1556    MAV_CMD_PREFLIGHT_STORAGE = 245,
1557    #[doc = "Request the reboot or shutdown of system components."]
1558    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1559    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1560    MAV_CMD_OVERRIDE_GOTO = 252,
1561    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1562    MAV_CMD_OBLIQUE_SURVEY = 260,
1563    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1564    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1565    #[doc = "start running a mission"]
1566    MAV_CMD_MISSION_START = 300,
1567    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1568    MAV_CMD_ACTUATOR_TEST = 310,
1569    #[doc = "Actuator configuration command."]
1570    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1571    #[doc = "Arms / Disarms a component"]
1572    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1573    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1574    MAV_CMD_RUN_PREARM_CHECKS = 401,
1575    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1576    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1577    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1578    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1579    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1580    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1581    MAV_CMD_GET_HOME_POSITION = 410,
1582    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1583    MAV_CMD_INJECT_FAILURE = 420,
1584    #[doc = "Starts receiver pairing."]
1585    MAV_CMD_START_RX_PAIR = 500,
1586    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1587    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1588    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1589    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1590    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1591    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1592    MAV_CMD_REQUEST_MESSAGE = 512,
1593    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1594    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1595    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1596    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1597    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1598    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1599    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1600    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1601    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1602    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1603    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1604    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1605    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1606    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1607    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1608    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1609    MAV_CMD_STORAGE_FORMAT = 526,
1610    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1611    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1612    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1613    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1614    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1615    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1616    #[doc = "Reset all camera settings to Factory Default"]
1617    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1618    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1619    MAV_CMD_SET_CAMERA_MODE = 530,
1620    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1621    MAV_CMD_SET_CAMERA_ZOOM = 531,
1622    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1623    MAV_CMD_SET_CAMERA_FOCUS = 532,
1624    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1625    MAV_CMD_SET_STORAGE_USAGE = 533,
1626    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1627    MAV_CMD_SET_CAMERA_SOURCE = 534,
1628    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1629    MAV_CMD_JUMP_TAG = 600,
1630    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1631    MAV_CMD_DO_JUMP_TAG = 601,
1632    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1633    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1634    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1635    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1636    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1637    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1638    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1639    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1640    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1641    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1642    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1643    #[doc = "Enable or disable on-board camera triggering system."]
1644    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1645    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1646    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1647    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1648    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1649    #[doc = "Stops ongoing tracking."]
1650    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1651    #[doc = "Starts video capture (recording)."]
1652    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1653    #[doc = "Stop the current video capture (recording)."]
1654    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1655    #[doc = "Start video streaming"]
1656    MAV_CMD_VIDEO_START_STREAMING = 2502,
1657    #[doc = "Stop the given video stream"]
1658    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1659    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1660    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1661    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1662    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1663    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1664    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1665    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1666    MAV_CMD_LOGGING_START = 2510,
1667    #[doc = "Request to stop streaming log data over MAVLink"]
1668    MAV_CMD_LOGGING_STOP = 2511,
1669    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1670    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1671    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1672    #[doc = "Create a panorama at the current position"]
1673    MAV_CMD_PANORAMA_CREATE = 2800,
1674    #[doc = "Request VTOL transition"]
1675    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1676    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1677    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1678    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1679    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1680    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1681    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1682    #[doc = "Delay mission state machine until gate has been reached."]
1683    MAV_CMD_CONDITION_GATE = 4501,
1684    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1685    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1686    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1687    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1688    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1689    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1690    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1691    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1692    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1693    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1694    #[doc = "Rally point. You can have multiple rally points defined."]
1695    MAV_CMD_NAV_RALLY_POINT = 5100,
1696    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1697    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1698    #[doc = "Change state of safety switch."]
1699    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1700    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1701    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1702    #[deprecated = "  (Deprecated since 2021-06)"]
1703    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1704    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1705    #[deprecated = "  (Deprecated since 2021-06)"]
1706    #[doc = "Control the payload deployment."]
1707    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1708    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1709    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1710    #[doc = "Command to operate winch."]
1711    MAV_CMD_DO_WINCH = 42600,
1712    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1713    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1714    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1715    MAV_CMD_WAYPOINT_USER_1 = 31000,
1716    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1717    MAV_CMD_WAYPOINT_USER_2 = 31001,
1718    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1719    MAV_CMD_WAYPOINT_USER_3 = 31002,
1720    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1721    MAV_CMD_WAYPOINT_USER_4 = 31003,
1722    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1723    MAV_CMD_WAYPOINT_USER_5 = 31004,
1724    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1725    MAV_CMD_SPATIAL_USER_1 = 31005,
1726    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1727    MAV_CMD_SPATIAL_USER_2 = 31006,
1728    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1729    MAV_CMD_SPATIAL_USER_3 = 31007,
1730    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1731    MAV_CMD_SPATIAL_USER_4 = 31008,
1732    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1733    MAV_CMD_SPATIAL_USER_5 = 31009,
1734    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1735    MAV_CMD_USER_1 = 31010,
1736    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1737    MAV_CMD_USER_2 = 31011,
1738    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1739    MAV_CMD_USER_3 = 31012,
1740    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1741    MAV_CMD_USER_4 = 31013,
1742    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1743    MAV_CMD_USER_5 = 31014,
1744    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1745    MAV_CMD_CAN_FORWARD = 32000,
1746}
1747impl MavCmd {
1748    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1749}
1750impl Default for MavCmd {
1751    fn default() -> Self {
1752        Self::DEFAULT
1753    }
1754}
1755#[cfg_attr(feature = "ts", derive(TS))]
1756#[cfg_attr(feature = "ts", ts(export))]
1757#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1758#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1759#[cfg_attr(feature = "serde", serde(tag = "type"))]
1760#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1761#[repr(u32)]
1762#[doc = "Possible actions an aircraft can take to avoid a collision."]
1763pub enum MavCollisionAction {
1764    #[doc = "Ignore any potential collisions"]
1765    MAV_COLLISION_ACTION_NONE = 0,
1766    #[doc = "Report potential collision"]
1767    MAV_COLLISION_ACTION_REPORT = 1,
1768    #[doc = "Ascend or Descend to avoid threat"]
1769    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1770    #[doc = "Move horizontally to avoid threat"]
1771    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1772    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1773    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1774    #[doc = "Aircraft to fly directly back to its launch point"]
1775    MAV_COLLISION_ACTION_RTL = 5,
1776    #[doc = "Aircraft to stop in place"]
1777    MAV_COLLISION_ACTION_HOVER = 6,
1778}
1779impl MavCollisionAction {
1780    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1781}
1782impl Default for MavCollisionAction {
1783    fn default() -> Self {
1784        Self::DEFAULT
1785    }
1786}
1787#[cfg_attr(feature = "ts", derive(TS))]
1788#[cfg_attr(feature = "ts", ts(export))]
1789#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1790#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1791#[cfg_attr(feature = "serde", serde(tag = "type"))]
1792#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1793#[repr(u32)]
1794#[doc = "Source of information about this collision."]
1795pub enum MavCollisionSrc {
1796    #[doc = "ID field references ADSB_VEHICLE packets"]
1797    MAV_COLLISION_SRC_ADSB = 0,
1798    #[doc = "ID field references MAVLink SRC ID"]
1799    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1800}
1801impl MavCollisionSrc {
1802    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1803}
1804impl Default for MavCollisionSrc {
1805    fn default() -> Self {
1806        Self::DEFAULT
1807    }
1808}
1809#[cfg_attr(feature = "ts", derive(TS))]
1810#[cfg_attr(feature = "ts", ts(export))]
1811#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1812#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1813#[cfg_attr(feature = "serde", serde(tag = "type"))]
1814#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1815#[repr(u32)]
1816#[doc = "Aircraft-rated danger from this threat."]
1817pub enum MavCollisionThreatLevel {
1818    #[doc = "Not a threat"]
1819    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1820    #[doc = "Craft is mildly concerned about this threat"]
1821    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1822    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1823    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1824}
1825impl MavCollisionThreatLevel {
1826    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1827}
1828impl Default for MavCollisionThreatLevel {
1829    fn default() -> Self {
1830        Self::DEFAULT
1831    }
1832}
1833#[cfg_attr(feature = "ts", derive(TS))]
1834#[cfg_attr(feature = "ts", ts(export))]
1835#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1836#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1837#[cfg_attr(feature = "serde", serde(tag = "type"))]
1838#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1839#[repr(u32)]
1840#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1841pub enum MavComponent {
1842    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1843    MAV_COMP_ID_ALL = 0,
1844    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1845    MAV_COMP_ID_AUTOPILOT1 = 1,
1846    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1847    MAV_COMP_ID_USER1 = 25,
1848    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1849    MAV_COMP_ID_USER2 = 26,
1850    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1851    MAV_COMP_ID_USER3 = 27,
1852    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1853    MAV_COMP_ID_USER4 = 28,
1854    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1855    MAV_COMP_ID_USER5 = 29,
1856    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1857    MAV_COMP_ID_USER6 = 30,
1858    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1859    MAV_COMP_ID_USER7 = 31,
1860    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1861    MAV_COMP_ID_USER8 = 32,
1862    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1863    MAV_COMP_ID_USER9 = 33,
1864    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1865    MAV_COMP_ID_USER10 = 34,
1866    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1867    MAV_COMP_ID_USER11 = 35,
1868    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1869    MAV_COMP_ID_USER12 = 36,
1870    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1871    MAV_COMP_ID_USER13 = 37,
1872    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1873    MAV_COMP_ID_USER14 = 38,
1874    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1875    MAV_COMP_ID_USER15 = 39,
1876    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1877    MAV_COMP_ID_USER16 = 40,
1878    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1879    MAV_COMP_ID_USER17 = 41,
1880    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1881    MAV_COMP_ID_USER18 = 42,
1882    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1883    MAV_COMP_ID_USER19 = 43,
1884    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1885    MAV_COMP_ID_USER20 = 44,
1886    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1887    MAV_COMP_ID_USER21 = 45,
1888    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1889    MAV_COMP_ID_USER22 = 46,
1890    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1891    MAV_COMP_ID_USER23 = 47,
1892    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1893    MAV_COMP_ID_USER24 = 48,
1894    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1895    MAV_COMP_ID_USER25 = 49,
1896    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1897    MAV_COMP_ID_USER26 = 50,
1898    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1899    MAV_COMP_ID_USER27 = 51,
1900    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1901    MAV_COMP_ID_USER28 = 52,
1902    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1903    MAV_COMP_ID_USER29 = 53,
1904    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1905    MAV_COMP_ID_USER30 = 54,
1906    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1907    MAV_COMP_ID_USER31 = 55,
1908    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1909    MAV_COMP_ID_USER32 = 56,
1910    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1911    MAV_COMP_ID_USER33 = 57,
1912    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1913    MAV_COMP_ID_USER34 = 58,
1914    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1915    MAV_COMP_ID_USER35 = 59,
1916    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1917    MAV_COMP_ID_USER36 = 60,
1918    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1919    MAV_COMP_ID_USER37 = 61,
1920    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1921    MAV_COMP_ID_USER38 = 62,
1922    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1923    MAV_COMP_ID_USER39 = 63,
1924    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1925    MAV_COMP_ID_USER40 = 64,
1926    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1927    MAV_COMP_ID_USER41 = 65,
1928    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1929    MAV_COMP_ID_USER42 = 66,
1930    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1931    MAV_COMP_ID_USER43 = 67,
1932    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1933    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1934    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1935    MAV_COMP_ID_USER45 = 69,
1936    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1937    MAV_COMP_ID_USER46 = 70,
1938    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1939    MAV_COMP_ID_USER47 = 71,
1940    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1941    MAV_COMP_ID_USER48 = 72,
1942    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1943    MAV_COMP_ID_USER49 = 73,
1944    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1945    MAV_COMP_ID_USER50 = 74,
1946    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1947    MAV_COMP_ID_USER51 = 75,
1948    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1949    MAV_COMP_ID_USER52 = 76,
1950    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1951    MAV_COMP_ID_USER53 = 77,
1952    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1953    MAV_COMP_ID_USER54 = 78,
1954    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1955    MAV_COMP_ID_USER55 = 79,
1956    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1957    MAV_COMP_ID_USER56 = 80,
1958    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1959    MAV_COMP_ID_USER57 = 81,
1960    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1961    MAV_COMP_ID_USER58 = 82,
1962    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1963    MAV_COMP_ID_USER59 = 83,
1964    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1965    MAV_COMP_ID_USER60 = 84,
1966    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1967    MAV_COMP_ID_USER61 = 85,
1968    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1969    MAV_COMP_ID_USER62 = 86,
1970    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1971    MAV_COMP_ID_USER63 = 87,
1972    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1973    MAV_COMP_ID_USER64 = 88,
1974    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1975    MAV_COMP_ID_USER65 = 89,
1976    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1977    MAV_COMP_ID_USER66 = 90,
1978    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1979    MAV_COMP_ID_USER67 = 91,
1980    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1981    MAV_COMP_ID_USER68 = 92,
1982    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1983    MAV_COMP_ID_USER69 = 93,
1984    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1985    MAV_COMP_ID_USER70 = 94,
1986    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1987    MAV_COMP_ID_USER71 = 95,
1988    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1989    MAV_COMP_ID_USER72 = 96,
1990    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1991    MAV_COMP_ID_USER73 = 97,
1992    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1993    MAV_COMP_ID_USER74 = 98,
1994    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1995    MAV_COMP_ID_USER75 = 99,
1996    #[doc = "Camera #1."]
1997    MAV_COMP_ID_CAMERA = 100,
1998    #[doc = "Camera #2."]
1999    MAV_COMP_ID_CAMERA2 = 101,
2000    #[doc = "Camera #3."]
2001    MAV_COMP_ID_CAMERA3 = 102,
2002    #[doc = "Camera #4."]
2003    MAV_COMP_ID_CAMERA4 = 103,
2004    #[doc = "Camera #5."]
2005    MAV_COMP_ID_CAMERA5 = 104,
2006    #[doc = "Camera #6."]
2007    MAV_COMP_ID_CAMERA6 = 105,
2008    #[doc = "Servo #1."]
2009    MAV_COMP_ID_SERVO1 = 140,
2010    #[doc = "Servo #2."]
2011    MAV_COMP_ID_SERVO2 = 141,
2012    #[doc = "Servo #3."]
2013    MAV_COMP_ID_SERVO3 = 142,
2014    #[doc = "Servo #4."]
2015    MAV_COMP_ID_SERVO4 = 143,
2016    #[doc = "Servo #5."]
2017    MAV_COMP_ID_SERVO5 = 144,
2018    #[doc = "Servo #6."]
2019    MAV_COMP_ID_SERVO6 = 145,
2020    #[doc = "Servo #7."]
2021    MAV_COMP_ID_SERVO7 = 146,
2022    #[doc = "Servo #8."]
2023    MAV_COMP_ID_SERVO8 = 147,
2024    #[doc = "Servo #9."]
2025    MAV_COMP_ID_SERVO9 = 148,
2026    #[doc = "Servo #10."]
2027    MAV_COMP_ID_SERVO10 = 149,
2028    #[doc = "Servo #11."]
2029    MAV_COMP_ID_SERVO11 = 150,
2030    #[doc = "Servo #12."]
2031    MAV_COMP_ID_SERVO12 = 151,
2032    #[doc = "Servo #13."]
2033    MAV_COMP_ID_SERVO13 = 152,
2034    #[doc = "Servo #14."]
2035    MAV_COMP_ID_SERVO14 = 153,
2036    #[doc = "Gimbal #1."]
2037    MAV_COMP_ID_GIMBAL = 154,
2038    #[doc = "Logging component."]
2039    MAV_COMP_ID_LOG = 155,
2040    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2041    MAV_COMP_ID_ADSB = 156,
2042    #[doc = "On Screen Display (OSD) devices for video links."]
2043    MAV_COMP_ID_OSD = 157,
2044    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2045    MAV_COMP_ID_PERIPHERAL = 158,
2046    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2047    #[doc = "Gimbal ID for QX1."]
2048    MAV_COMP_ID_QX1_GIMBAL = 159,
2049    #[doc = "FLARM collision alert component."]
2050    MAV_COMP_ID_FLARM = 160,
2051    #[doc = "Parachute component."]
2052    MAV_COMP_ID_PARACHUTE = 161,
2053    #[doc = "Winch component."]
2054    MAV_COMP_ID_WINCH = 169,
2055    #[doc = "Gimbal #2."]
2056    MAV_COMP_ID_GIMBAL2 = 171,
2057    #[doc = "Gimbal #3."]
2058    MAV_COMP_ID_GIMBAL3 = 172,
2059    #[doc = "Gimbal #4"]
2060    MAV_COMP_ID_GIMBAL4 = 173,
2061    #[doc = "Gimbal #5."]
2062    MAV_COMP_ID_GIMBAL5 = 174,
2063    #[doc = "Gimbal #6."]
2064    MAV_COMP_ID_GIMBAL6 = 175,
2065    #[doc = "Battery #1."]
2066    MAV_COMP_ID_BATTERY = 180,
2067    #[doc = "Battery #2."]
2068    MAV_COMP_ID_BATTERY2 = 181,
2069    #[doc = "CAN over MAVLink client."]
2070    MAV_COMP_ID_MAVCAN = 189,
2071    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2072    MAV_COMP_ID_MISSIONPLANNER = 190,
2073    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2074    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2075    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2076    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2077    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2078    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2079    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2080    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2081    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2082    MAV_COMP_ID_PATHPLANNER = 195,
2083    #[doc = "Component that plans a collision free path between two points."]
2084    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2085    #[doc = "Component that provides position estimates using VIO techniques."]
2086    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2087    #[doc = "Component that manages pairing of vehicle and GCS."]
2088    MAV_COMP_ID_PAIRING_MANAGER = 198,
2089    #[doc = "Inertial Measurement Unit (IMU) #1."]
2090    MAV_COMP_ID_IMU = 200,
2091    #[doc = "Inertial Measurement Unit (IMU) #2."]
2092    MAV_COMP_ID_IMU_2 = 201,
2093    #[doc = "Inertial Measurement Unit (IMU) #3."]
2094    MAV_COMP_ID_IMU_3 = 202,
2095    #[doc = "GPS #1."]
2096    MAV_COMP_ID_GPS = 220,
2097    #[doc = "GPS #2."]
2098    MAV_COMP_ID_GPS2 = 221,
2099    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2100    MAV_COMP_ID_ODID_TXRX_1 = 236,
2101    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2102    MAV_COMP_ID_ODID_TXRX_2 = 237,
2103    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2104    MAV_COMP_ID_ODID_TXRX_3 = 238,
2105    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2106    MAV_COMP_ID_UDP_BRIDGE = 240,
2107    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2108    MAV_COMP_ID_UART_BRIDGE = 241,
2109    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2110    MAV_COMP_ID_TUNNEL_NODE = 242,
2111    #[doc = "Illuminator"]
2112    MAV_COMP_ID_ILLUMINATOR = 243,
2113    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2114    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2115    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2116}
2117impl MavComponent {
2118    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2119}
2120impl Default for MavComponent {
2121    fn default() -> Self {
2122        Self::DEFAULT
2123    }
2124}
2125#[cfg_attr(feature = "ts", derive(TS))]
2126#[cfg_attr(feature = "ts", ts(export))]
2127#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2128#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2129#[cfg_attr(feature = "serde", serde(tag = "type"))]
2130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2131#[repr(u32)]
2132#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2133#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2134pub enum MavDataStream {
2135    #[doc = "Enable all data streams"]
2136    MAV_DATA_STREAM_ALL = 0,
2137    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2138    MAV_DATA_STREAM_RAW_SENSORS = 1,
2139    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2140    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2141    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2142    MAV_DATA_STREAM_RC_CHANNELS = 3,
2143    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2144    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2145    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2146    MAV_DATA_STREAM_POSITION = 6,
2147    #[doc = "Dependent on the autopilot"]
2148    MAV_DATA_STREAM_EXTRA1 = 10,
2149    #[doc = "Dependent on the autopilot"]
2150    MAV_DATA_STREAM_EXTRA2 = 11,
2151    #[doc = "Dependent on the autopilot"]
2152    MAV_DATA_STREAM_EXTRA3 = 12,
2153}
2154impl MavDataStream {
2155    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2156}
2157impl Default for MavDataStream {
2158    fn default() -> Self {
2159        Self::DEFAULT
2160    }
2161}
2162#[cfg_attr(feature = "ts", derive(TS))]
2163#[cfg_attr(feature = "ts", ts(export))]
2164#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2165#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2166#[cfg_attr(feature = "serde", serde(tag = "type"))]
2167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2168#[repr(u32)]
2169#[doc = "Enumeration of distance sensor types"]
2170pub enum MavDistanceSensor {
2171    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2172    MAV_DISTANCE_SENSOR_LASER = 0,
2173    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2174    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2175    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2176    MAV_DISTANCE_SENSOR_INFRARED = 2,
2177    #[doc = "Radar type, e.g. uLanding units"]
2178    MAV_DISTANCE_SENSOR_RADAR = 3,
2179    #[doc = "Broken or unknown type, e.g. analog units"]
2180    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2181}
2182impl MavDistanceSensor {
2183    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2184}
2185impl Default for MavDistanceSensor {
2186    fn default() -> Self {
2187        Self::DEFAULT
2188    }
2189}
2190#[cfg_attr(feature = "ts", derive(TS))]
2191#[cfg_attr(feature = "ts", ts(export))]
2192#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2193#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2194#[cfg_attr(feature = "serde", serde(tag = "type"))]
2195#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2196#[repr(u32)]
2197#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2198pub enum MavDoRepositionFlags {
2199    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2200    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2201}
2202impl MavDoRepositionFlags {
2203    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2204}
2205impl Default for MavDoRepositionFlags {
2206    fn default() -> Self {
2207        Self::DEFAULT
2208    }
2209}
2210#[cfg_attr(feature = "ts", derive(TS))]
2211#[cfg_attr(feature = "ts", ts(export))]
2212#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2213#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2214#[cfg_attr(feature = "serde", serde(tag = "type"))]
2215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2216#[repr(u32)]
2217#[doc = "Enumeration of estimator types"]
2218pub enum MavEstimatorType {
2219    #[doc = "Unknown type of the estimator."]
2220    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2221    #[doc = "This is a naive estimator without any real covariance feedback."]
2222    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2223    #[doc = "Computer vision based estimate. Might be up to scale."]
2224    MAV_ESTIMATOR_TYPE_VISION = 2,
2225    #[doc = "Visual-inertial estimate."]
2226    MAV_ESTIMATOR_TYPE_VIO = 3,
2227    #[doc = "Plain GPS estimate."]
2228    MAV_ESTIMATOR_TYPE_GPS = 4,
2229    #[doc = "Estimator integrating GPS and inertial sensing."]
2230    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2231    #[doc = "Estimate from external motion capturing system."]
2232    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2233    #[doc = "Estimator based on lidar sensor input."]
2234    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2235    #[doc = "Estimator on autopilot."]
2236    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2237}
2238impl MavEstimatorType {
2239    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2240}
2241impl Default for MavEstimatorType {
2242    fn default() -> Self {
2243        Self::DEFAULT
2244    }
2245}
2246#[cfg_attr(feature = "ts", derive(TS))]
2247#[cfg_attr(feature = "ts", ts(export))]
2248#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2249#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2250#[cfg_attr(feature = "serde", serde(tag = "type"))]
2251#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2252#[repr(u32)]
2253#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2254pub enum MavEventCurrentSequenceFlags {
2255    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2256    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2257}
2258impl MavEventCurrentSequenceFlags {
2259    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2260}
2261impl Default for MavEventCurrentSequenceFlags {
2262    fn default() -> Self {
2263        Self::DEFAULT
2264    }
2265}
2266#[cfg_attr(feature = "ts", derive(TS))]
2267#[cfg_attr(feature = "ts", ts(export))]
2268#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2269#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2270#[cfg_attr(feature = "serde", serde(tag = "type"))]
2271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2272#[repr(u32)]
2273#[doc = "Reason for an event error response."]
2274pub enum MavEventErrorReason {
2275    #[doc = "The requested event is not available (anymore)."]
2276    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2277}
2278impl MavEventErrorReason {
2279    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2280}
2281impl Default for MavEventErrorReason {
2282    fn default() -> Self {
2283        Self::DEFAULT
2284    }
2285}
2286#[cfg_attr(feature = "ts", derive(TS))]
2287#[cfg_attr(feature = "ts", ts(export))]
2288#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2289#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2290#[cfg_attr(feature = "serde", serde(tag = "type"))]
2291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2292#[repr(u32)]
2293#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2294pub enum MavFrame {
2295    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2296    MAV_FRAME_GLOBAL = 0,
2297    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2298    MAV_FRAME_LOCAL_NED = 1,
2299    #[doc = "NOT a coordinate frame, indicates a mission command."]
2300    MAV_FRAME_MISSION = 2,
2301    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2302    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2303    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2304    MAV_FRAME_LOCAL_ENU = 4,
2305    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2306    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2307    MAV_FRAME_GLOBAL_INT = 5,
2308    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2309    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2310    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2311    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2312    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2313    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2314    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2315    MAV_FRAME_BODY_NED = 8,
2316    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2317    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2318    MAV_FRAME_BODY_OFFSET_NED = 9,
2319    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2320    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2321    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2322    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2323    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2324    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2325    MAV_FRAME_BODY_FRD = 12,
2326    #[deprecated = "  (Deprecated since 2019-04)"]
2327    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2328    MAV_FRAME_RESERVED_13 = 13,
2329    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2330    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2331    MAV_FRAME_RESERVED_14 = 14,
2332    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2333    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2334    MAV_FRAME_RESERVED_15 = 15,
2335    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2336    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2337    MAV_FRAME_RESERVED_16 = 16,
2338    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2339    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2340    MAV_FRAME_RESERVED_17 = 17,
2341    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2342    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2343    MAV_FRAME_RESERVED_18 = 18,
2344    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2345    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2346    MAV_FRAME_RESERVED_19 = 19,
2347    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2348    MAV_FRAME_LOCAL_FRD = 20,
2349    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2350    MAV_FRAME_LOCAL_FLU = 21,
2351}
2352impl MavFrame {
2353    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2354}
2355impl Default for MavFrame {
2356    fn default() -> Self {
2357        Self::DEFAULT
2358    }
2359}
2360#[cfg_attr(feature = "ts", derive(TS))]
2361#[cfg_attr(feature = "ts", ts(export))]
2362#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2364#[cfg_attr(feature = "serde", serde(tag = "type"))]
2365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2366#[repr(u32)]
2367#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2368pub enum MavFtpErr {
2369    #[doc = "None: No error"]
2370    MAV_FTP_ERR_NONE = 0,
2371    #[doc = "Fail: Unknown failure"]
2372    MAV_FTP_ERR_FAIL = 1,
2373    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2374    MAV_FTP_ERR_FAILERRNO = 2,
2375    #[doc = "InvalidDataSize: Payload size is invalid"]
2376    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2377    #[doc = "InvalidSession: Session is not currently open"]
2378    MAV_FTP_ERR_INVALIDSESSION = 4,
2379    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2380    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2381    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2382    MAV_FTP_ERR_EOF = 6,
2383    #[doc = "UnknownCommand: Unknown command / opcode"]
2384    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2385    #[doc = "FileExists: File/directory already exists"]
2386    MAV_FTP_ERR_FILEEXISTS = 8,
2387    #[doc = "FileProtected: File/directory is write protected"]
2388    MAV_FTP_ERR_FILEPROTECTED = 9,
2389    #[doc = "FileNotFound: File/directory not found"]
2390    MAV_FTP_ERR_FILENOTFOUND = 10,
2391}
2392impl MavFtpErr {
2393    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2394}
2395impl Default for MavFtpErr {
2396    fn default() -> Self {
2397        Self::DEFAULT
2398    }
2399}
2400#[cfg_attr(feature = "ts", derive(TS))]
2401#[cfg_attr(feature = "ts", ts(export))]
2402#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2403#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2404#[cfg_attr(feature = "serde", serde(tag = "type"))]
2405#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2406#[repr(u32)]
2407#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2408pub enum MavFtpOpcode {
2409    #[doc = "None. Ignored, always ACKed"]
2410    MAV_FTP_OPCODE_NONE = 0,
2411    #[doc = "TerminateSession: Terminates open Read session"]
2412    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2413    #[doc = "ResetSessions: Terminates all open read sessions"]
2414    MAV_FTP_OPCODE_RESETSESSION = 2,
2415    #[doc = "ListDirectory. List files and directories in path from offset"]
2416    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2417    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2418    MAV_FTP_OPCODE_OPENFILERO = 4,
2419    #[doc = "ReadFile: Reads size bytes from offset in session"]
2420    MAV_FTP_OPCODE_READFILE = 5,
2421    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2422    MAV_FTP_OPCODE_CREATEFILE = 6,
2423    #[doc = "WriteFile: Writes size bytes to offset in session"]
2424    MAV_FTP_OPCODE_WRITEFILE = 7,
2425    #[doc = "RemoveFile: Remove file at path"]
2426    MAV_FTP_OPCODE_REMOVEFILE = 8,
2427    #[doc = "CreateDirectory: Creates directory at path"]
2428    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2429    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2430    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2431    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2432    MAV_FTP_OPCODE_OPENFILEWO = 11,
2433    #[doc = "TruncateFile: Truncate file at path to offset length"]
2434    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2435    #[doc = "Rename: Rename path1 to path2"]
2436    MAV_FTP_OPCODE_RENAME = 13,
2437    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2438    MAV_FTP_OPCODE_CALCFILECRC = 14,
2439    #[doc = "BurstReadFile: Burst download session file"]
2440    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2441    #[doc = "ACK: ACK response"]
2442    MAV_FTP_OPCODE_ACK = 128,
2443    #[doc = "NAK: NAK response"]
2444    MAV_FTP_OPCODE_NAK = 129,
2445}
2446impl MavFtpOpcode {
2447    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2448}
2449impl Default for MavFtpOpcode {
2450    fn default() -> Self {
2451        Self::DEFAULT
2452    }
2453}
2454#[cfg_attr(feature = "ts", derive(TS))]
2455#[cfg_attr(feature = "ts", ts(export))]
2456#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2457#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2458#[cfg_attr(feature = "serde", serde(tag = "type"))]
2459#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2460#[repr(u32)]
2461#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2462pub enum MavFuelType {
2463    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2464    MAV_FUEL_TYPE_UNKNOWN = 0,
2465    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2466    MAV_FUEL_TYPE_LIQUID = 1,
2467    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2468    MAV_FUEL_TYPE_GAS = 2,
2469}
2470impl MavFuelType {
2471    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2472}
2473impl Default for MavFuelType {
2474    fn default() -> Self {
2475        Self::DEFAULT
2476    }
2477}
2478bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2479impl MavGeneratorStatusFlag {
2480    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2481}
2482impl Default for MavGeneratorStatusFlag {
2483    fn default() -> Self {
2484        Self::DEFAULT
2485    }
2486}
2487#[cfg_attr(feature = "ts", derive(TS))]
2488#[cfg_attr(feature = "ts", ts(export))]
2489#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2490#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2491#[cfg_attr(feature = "serde", serde(tag = "type"))]
2492#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2493#[repr(u32)]
2494#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2495pub enum MavGoto {
2496    #[doc = "Hold at the current position."]
2497    MAV_GOTO_DO_HOLD = 0,
2498    #[doc = "Continue with the next item in mission execution."]
2499    MAV_GOTO_DO_CONTINUE = 1,
2500    #[doc = "Hold at the current position of the system"]
2501    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2502    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2503    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2504}
2505impl MavGoto {
2506    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2507}
2508impl Default for MavGoto {
2509    fn default() -> Self {
2510        Self::DEFAULT
2511    }
2512}
2513#[cfg_attr(feature = "ts", derive(TS))]
2514#[cfg_attr(feature = "ts", ts(export))]
2515#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2517#[cfg_attr(feature = "serde", serde(tag = "type"))]
2518#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2519#[repr(u32)]
2520#[doc = "Enumeration of landed detector states"]
2521pub enum MavLandedState {
2522    #[doc = "MAV landed state is unknown"]
2523    MAV_LANDED_STATE_UNDEFINED = 0,
2524    #[doc = "MAV is landed (on ground)"]
2525    MAV_LANDED_STATE_ON_GROUND = 1,
2526    #[doc = "MAV is in air"]
2527    MAV_LANDED_STATE_IN_AIR = 2,
2528    #[doc = "MAV currently taking off"]
2529    MAV_LANDED_STATE_TAKEOFF = 3,
2530    #[doc = "MAV currently landing"]
2531    MAV_LANDED_STATE_LANDING = 4,
2532}
2533impl MavLandedState {
2534    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2535}
2536impl Default for MavLandedState {
2537    fn default() -> Self {
2538        Self::DEFAULT
2539    }
2540}
2541#[cfg_attr(feature = "ts", derive(TS))]
2542#[cfg_attr(feature = "ts", ts(export))]
2543#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2544#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2545#[cfg_attr(feature = "serde", serde(tag = "type"))]
2546#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2547#[repr(u32)]
2548#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2549pub enum MavMissionResult {
2550    #[doc = "mission accepted OK"]
2551    MAV_MISSION_ACCEPTED = 0,
2552    #[doc = "Generic error / not accepting mission commands at all right now."]
2553    MAV_MISSION_ERROR = 1,
2554    #[doc = "Coordinate frame is not supported."]
2555    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2556    #[doc = "Command is not supported."]
2557    MAV_MISSION_UNSUPPORTED = 3,
2558    #[doc = "Mission items exceed storage space."]
2559    MAV_MISSION_NO_SPACE = 4,
2560    #[doc = "One of the parameters has an invalid value."]
2561    MAV_MISSION_INVALID = 5,
2562    #[doc = "param1 has an invalid value."]
2563    MAV_MISSION_INVALID_PARAM1 = 6,
2564    #[doc = "param2 has an invalid value."]
2565    MAV_MISSION_INVALID_PARAM2 = 7,
2566    #[doc = "param3 has an invalid value."]
2567    MAV_MISSION_INVALID_PARAM3 = 8,
2568    #[doc = "param4 has an invalid value."]
2569    MAV_MISSION_INVALID_PARAM4 = 9,
2570    #[doc = "x / param5 has an invalid value."]
2571    MAV_MISSION_INVALID_PARAM5_X = 10,
2572    #[doc = "y / param6 has an invalid value."]
2573    MAV_MISSION_INVALID_PARAM6_Y = 11,
2574    #[doc = "z / param7 has an invalid value."]
2575    MAV_MISSION_INVALID_PARAM7 = 12,
2576    #[doc = "Mission item received out of sequence"]
2577    MAV_MISSION_INVALID_SEQUENCE = 13,
2578    #[doc = "Not accepting any mission commands from this communication partner."]
2579    MAV_MISSION_DENIED = 14,
2580    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2581    MAV_MISSION_OPERATION_CANCELLED = 15,
2582}
2583impl MavMissionResult {
2584    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2585}
2586impl Default for MavMissionResult {
2587    fn default() -> Self {
2588        Self::DEFAULT
2589    }
2590}
2591#[cfg_attr(feature = "ts", derive(TS))]
2592#[cfg_attr(feature = "ts", ts(export))]
2593#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2594#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2595#[cfg_attr(feature = "serde", serde(tag = "type"))]
2596#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2597#[repr(u32)]
2598#[doc = "Type of mission items being requested/sent in mission protocol."]
2599pub enum MavMissionType {
2600    #[doc = "Items are mission commands for main mission."]
2601    MAV_MISSION_TYPE_MISSION = 0,
2602    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2603    MAV_MISSION_TYPE_FENCE = 1,
2604    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2605    MAV_MISSION_TYPE_RALLY = 2,
2606    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2607    MAV_MISSION_TYPE_ALL = 255,
2608}
2609impl MavMissionType {
2610    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2611}
2612impl Default for MavMissionType {
2613    fn default() -> Self {
2614        Self::DEFAULT
2615    }
2616}
2617#[cfg_attr(feature = "ts", derive(TS))]
2618#[cfg_attr(feature = "ts", ts(export))]
2619#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2620#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2621#[cfg_attr(feature = "serde", serde(tag = "type"))]
2622#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2623#[repr(u32)]
2624#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2625pub enum MavMode {
2626    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2627    MAV_MODE_PREFLIGHT = 0,
2628    #[doc = "System is allowed to be active, under assisted RC control."]
2629    MAV_MODE_STABILIZE_DISARMED = 80,
2630    #[doc = "System is allowed to be active, under assisted RC control."]
2631    MAV_MODE_STABILIZE_ARMED = 208,
2632    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2633    MAV_MODE_MANUAL_DISARMED = 64,
2634    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2635    MAV_MODE_MANUAL_ARMED = 192,
2636    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2637    MAV_MODE_GUIDED_DISARMED = 88,
2638    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2639    MAV_MODE_GUIDED_ARMED = 216,
2640    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2641    MAV_MODE_AUTO_DISARMED = 92,
2642    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2643    MAV_MODE_AUTO_ARMED = 220,
2644    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2645    MAV_MODE_TEST_DISARMED = 66,
2646    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2647    MAV_MODE_TEST_ARMED = 194,
2648}
2649impl MavMode {
2650    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2651}
2652impl Default for MavMode {
2653    fn default() -> Self {
2654        Self::DEFAULT
2655    }
2656}
2657bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2658impl MavModeFlag {
2659    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2660}
2661impl Default for MavModeFlag {
2662    fn default() -> Self {
2663        Self::DEFAULT
2664    }
2665}
2666#[cfg_attr(feature = "ts", derive(TS))]
2667#[cfg_attr(feature = "ts", ts(export))]
2668#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2669#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2670#[cfg_attr(feature = "serde", serde(tag = "type"))]
2671#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2672#[repr(u32)]
2673#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2674pub enum MavModeFlagDecodePosition {
2675    #[doc = "First bit:  10000000"]
2676    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2677    #[doc = "Second bit: 01000000"]
2678    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2679    #[doc = "Third bit:  00100000"]
2680    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2681    #[doc = "Fourth bit: 00010000"]
2682    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2683    #[doc = "Fifth bit:  00001000"]
2684    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2685    #[doc = "Sixth bit:   00000100"]
2686    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2687    #[doc = "Seventh bit: 00000010"]
2688    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2689    #[doc = "Eighth bit: 00000001"]
2690    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2691}
2692impl MavModeFlagDecodePosition {
2693    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2694}
2695impl Default for MavModeFlagDecodePosition {
2696    fn default() -> Self {
2697        Self::DEFAULT
2698    }
2699}
2700bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2701impl MavModeProperty {
2702    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2703}
2704impl Default for MavModeProperty {
2705    fn default() -> Self {
2706        Self::DEFAULT
2707    }
2708}
2709#[cfg_attr(feature = "ts", derive(TS))]
2710#[cfg_attr(feature = "ts", ts(export))]
2711#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2712#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2713#[cfg_attr(feature = "serde", serde(tag = "type"))]
2714#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2715#[repr(u32)]
2716#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2717#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2718pub enum MavMountMode {
2719    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2720    MAV_MOUNT_MODE_RETRACT = 0,
2721    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2722    MAV_MOUNT_MODE_NEUTRAL = 1,
2723    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2724    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2725    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2726    MAV_MOUNT_MODE_RC_TARGETING = 3,
2727    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2728    MAV_MOUNT_MODE_GPS_POINT = 4,
2729    #[doc = "Gimbal tracks system with specified system ID"]
2730    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2731    #[doc = "Gimbal tracks home position"]
2732    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2733}
2734impl MavMountMode {
2735    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2736}
2737impl Default for MavMountMode {
2738    fn default() -> Self {
2739        Self::DEFAULT
2740    }
2741}
2742#[cfg_attr(feature = "ts", derive(TS))]
2743#[cfg_attr(feature = "ts", ts(export))]
2744#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2745#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2746#[cfg_attr(feature = "serde", serde(tag = "type"))]
2747#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2748#[repr(u32)]
2749pub enum MavOdidArmStatus {
2750    #[doc = "Passing arming checks."]
2751    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2752    #[doc = "Generic arming failure, see error string for details."]
2753    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2754}
2755impl MavOdidArmStatus {
2756    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2757}
2758impl Default for MavOdidArmStatus {
2759    fn default() -> Self {
2760        Self::DEFAULT
2761    }
2762}
2763#[cfg_attr(feature = "ts", derive(TS))]
2764#[cfg_attr(feature = "ts", ts(export))]
2765#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2766#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2767#[cfg_attr(feature = "serde", serde(tag = "type"))]
2768#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2769#[repr(u32)]
2770pub enum MavOdidAuthType {
2771    #[doc = "No authentication type is specified."]
2772    MAV_ODID_AUTH_TYPE_NONE = 0,
2773    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2774    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2775    #[doc = "Signature for the Operator ID."]
2776    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2777    #[doc = "Signature for the entire message set."]
2778    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2779    #[doc = "Authentication is provided by Network Remote ID."]
2780    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2781    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2782    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2783}
2784impl MavOdidAuthType {
2785    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2786}
2787impl Default for MavOdidAuthType {
2788    fn default() -> Self {
2789        Self::DEFAULT
2790    }
2791}
2792#[cfg_attr(feature = "ts", derive(TS))]
2793#[cfg_attr(feature = "ts", ts(export))]
2794#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2795#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2796#[cfg_attr(feature = "serde", serde(tag = "type"))]
2797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2798#[repr(u32)]
2799pub enum MavOdidCategoryEu {
2800    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2801    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2802    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2803    MAV_ODID_CATEGORY_EU_OPEN = 1,
2804    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2805    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2806    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2807    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2808}
2809impl MavOdidCategoryEu {
2810    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2811}
2812impl Default for MavOdidCategoryEu {
2813    fn default() -> Self {
2814        Self::DEFAULT
2815    }
2816}
2817#[cfg_attr(feature = "ts", derive(TS))]
2818#[cfg_attr(feature = "ts", ts(export))]
2819#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2820#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2821#[cfg_attr(feature = "serde", serde(tag = "type"))]
2822#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2823#[repr(u32)]
2824pub enum MavOdidClassEu {
2825    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2826    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2827    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2828    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2829    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2830    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2831    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2832    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2833    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2834    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2835    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2836    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2837    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2838    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2839    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2840    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2841}
2842impl MavOdidClassEu {
2843    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2844}
2845impl Default for MavOdidClassEu {
2846    fn default() -> Self {
2847        Self::DEFAULT
2848    }
2849}
2850#[cfg_attr(feature = "ts", derive(TS))]
2851#[cfg_attr(feature = "ts", ts(export))]
2852#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2853#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2854#[cfg_attr(feature = "serde", serde(tag = "type"))]
2855#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2856#[repr(u32)]
2857pub enum MavOdidClassificationType {
2858    #[doc = "The classification type for the UA is undeclared."]
2859    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2860    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2861    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2862}
2863impl MavOdidClassificationType {
2864    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2865}
2866impl Default for MavOdidClassificationType {
2867    fn default() -> Self {
2868        Self::DEFAULT
2869    }
2870}
2871#[cfg_attr(feature = "ts", derive(TS))]
2872#[cfg_attr(feature = "ts", ts(export))]
2873#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2874#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2875#[cfg_attr(feature = "serde", serde(tag = "type"))]
2876#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2877#[repr(u32)]
2878pub enum MavOdidDescType {
2879    #[doc = "Optional free-form text description of the purpose of the flight."]
2880    MAV_ODID_DESC_TYPE_TEXT = 0,
2881    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2882    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2883    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2884    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2885}
2886impl MavOdidDescType {
2887    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2888}
2889impl Default for MavOdidDescType {
2890    fn default() -> Self {
2891        Self::DEFAULT
2892    }
2893}
2894#[cfg_attr(feature = "ts", derive(TS))]
2895#[cfg_attr(feature = "ts", ts(export))]
2896#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2897#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2898#[cfg_attr(feature = "serde", serde(tag = "type"))]
2899#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2900#[repr(u32)]
2901pub enum MavOdidHeightRef {
2902    #[doc = "The height field is relative to the take-off location."]
2903    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2904    #[doc = "The height field is relative to ground."]
2905    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2906}
2907impl MavOdidHeightRef {
2908    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2909}
2910impl Default for MavOdidHeightRef {
2911    fn default() -> Self {
2912        Self::DEFAULT
2913    }
2914}
2915#[cfg_attr(feature = "ts", derive(TS))]
2916#[cfg_attr(feature = "ts", ts(export))]
2917#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2918#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2919#[cfg_attr(feature = "serde", serde(tag = "type"))]
2920#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2921#[repr(u32)]
2922pub enum MavOdidHorAcc {
2923    #[doc = "The horizontal accuracy is unknown."]
2924    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2925    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2926    MAV_ODID_HOR_ACC_10NM = 1,
2927    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2928    MAV_ODID_HOR_ACC_4NM = 2,
2929    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2930    MAV_ODID_HOR_ACC_2NM = 3,
2931    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2932    MAV_ODID_HOR_ACC_1NM = 4,
2933    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2934    MAV_ODID_HOR_ACC_0_5NM = 5,
2935    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2936    MAV_ODID_HOR_ACC_0_3NM = 6,
2937    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2938    MAV_ODID_HOR_ACC_0_1NM = 7,
2939    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2940    MAV_ODID_HOR_ACC_0_05NM = 8,
2941    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2942    MAV_ODID_HOR_ACC_30_METER = 9,
2943    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2944    MAV_ODID_HOR_ACC_10_METER = 10,
2945    #[doc = "The horizontal accuracy is smaller than 3 meter."]
2946    MAV_ODID_HOR_ACC_3_METER = 11,
2947    #[doc = "The horizontal accuracy is smaller than 1 meter."]
2948    MAV_ODID_HOR_ACC_1_METER = 12,
2949}
2950impl MavOdidHorAcc {
2951    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
2952}
2953impl Default for MavOdidHorAcc {
2954    fn default() -> Self {
2955        Self::DEFAULT
2956    }
2957}
2958#[cfg_attr(feature = "ts", derive(TS))]
2959#[cfg_attr(feature = "ts", ts(export))]
2960#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2961#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2962#[cfg_attr(feature = "serde", serde(tag = "type"))]
2963#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2964#[repr(u32)]
2965pub enum MavOdidIdType {
2966    #[doc = "No type defined."]
2967    MAV_ODID_ID_TYPE_NONE = 0,
2968    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
2969    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
2970    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
2971    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
2972    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
2973    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
2974    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
2975    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
2976}
2977impl MavOdidIdType {
2978    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
2979}
2980impl Default for MavOdidIdType {
2981    fn default() -> Self {
2982        Self::DEFAULT
2983    }
2984}
2985#[cfg_attr(feature = "ts", derive(TS))]
2986#[cfg_attr(feature = "ts", ts(export))]
2987#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2988#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2989#[cfg_attr(feature = "serde", serde(tag = "type"))]
2990#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2991#[repr(u32)]
2992pub enum MavOdidOperatorIdType {
2993    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
2994    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
2995}
2996impl MavOdidOperatorIdType {
2997    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
2998}
2999impl Default for MavOdidOperatorIdType {
3000    fn default() -> Self {
3001        Self::DEFAULT
3002    }
3003}
3004#[cfg_attr(feature = "ts", derive(TS))]
3005#[cfg_attr(feature = "ts", ts(export))]
3006#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3007#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3008#[cfg_attr(feature = "serde", serde(tag = "type"))]
3009#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3010#[repr(u32)]
3011pub enum MavOdidOperatorLocationType {
3012    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3013    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3014    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3015    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3016    #[doc = "The location/altitude of the operator are fixed values."]
3017    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3018}
3019impl MavOdidOperatorLocationType {
3020    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3021}
3022impl Default for MavOdidOperatorLocationType {
3023    fn default() -> Self {
3024        Self::DEFAULT
3025    }
3026}
3027#[cfg_attr(feature = "ts", derive(TS))]
3028#[cfg_attr(feature = "ts", ts(export))]
3029#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3030#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3031#[cfg_attr(feature = "serde", serde(tag = "type"))]
3032#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3033#[repr(u32)]
3034pub enum MavOdidSpeedAcc {
3035    #[doc = "The speed accuracy is unknown."]
3036    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3037    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3038    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3039    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3040    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3041    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3042    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3043    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3044    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3045}
3046impl MavOdidSpeedAcc {
3047    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3048}
3049impl Default for MavOdidSpeedAcc {
3050    fn default() -> Self {
3051        Self::DEFAULT
3052    }
3053}
3054#[cfg_attr(feature = "ts", derive(TS))]
3055#[cfg_attr(feature = "ts", ts(export))]
3056#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3057#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3058#[cfg_attr(feature = "serde", serde(tag = "type"))]
3059#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3060#[repr(u32)]
3061pub enum MavOdidStatus {
3062    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3063    MAV_ODID_STATUS_UNDECLARED = 0,
3064    #[doc = "The UA is on the ground."]
3065    MAV_ODID_STATUS_GROUND = 1,
3066    #[doc = "The UA is in the air."]
3067    MAV_ODID_STATUS_AIRBORNE = 2,
3068    #[doc = "The UA is having an emergency."]
3069    MAV_ODID_STATUS_EMERGENCY = 3,
3070    #[doc = "The remote ID system is failing or unreliable in some way."]
3071    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3072}
3073impl MavOdidStatus {
3074    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3075}
3076impl Default for MavOdidStatus {
3077    fn default() -> Self {
3078        Self::DEFAULT
3079    }
3080}
3081#[cfg_attr(feature = "ts", derive(TS))]
3082#[cfg_attr(feature = "ts", ts(export))]
3083#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3085#[cfg_attr(feature = "serde", serde(tag = "type"))]
3086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3087#[repr(u32)]
3088pub enum MavOdidTimeAcc {
3089    #[doc = "The timestamp accuracy is unknown."]
3090    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3091    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3092    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3093    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3094    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3095    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3096    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3097    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3098    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3099    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3100    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3101    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3102    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3103    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3104    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3105    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3106    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3107    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3108    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3109    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3110    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3111    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3112    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3113    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3114    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3115    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3116    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3117    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3118    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3119    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3120    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3121}
3122impl MavOdidTimeAcc {
3123    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3124}
3125impl Default for MavOdidTimeAcc {
3126    fn default() -> Self {
3127        Self::DEFAULT
3128    }
3129}
3130#[cfg_attr(feature = "ts", derive(TS))]
3131#[cfg_attr(feature = "ts", ts(export))]
3132#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3133#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3134#[cfg_attr(feature = "serde", serde(tag = "type"))]
3135#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3136#[repr(u32)]
3137pub enum MavOdidUaType {
3138    #[doc = "No UA (Unmanned Aircraft) type defined."]
3139    MAV_ODID_UA_TYPE_NONE = 0,
3140    #[doc = "Aeroplane/Airplane. Fixed wing."]
3141    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3142    #[doc = "Helicopter or multirotor."]
3143    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3144    #[doc = "Gyroplane."]
3145    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3146    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3147    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3148    #[doc = "Ornithopter."]
3149    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3150    #[doc = "Glider."]
3151    MAV_ODID_UA_TYPE_GLIDER = 6,
3152    #[doc = "Kite."]
3153    MAV_ODID_UA_TYPE_KITE = 7,
3154    #[doc = "Free Balloon."]
3155    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3156    #[doc = "Captive Balloon."]
3157    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3158    #[doc = "Airship. E.g. a blimp."]
3159    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3160    #[doc = "Free Fall/Parachute (unpowered)."]
3161    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3162    #[doc = "Rocket."]
3163    MAV_ODID_UA_TYPE_ROCKET = 12,
3164    #[doc = "Tethered powered aircraft."]
3165    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3166    #[doc = "Ground Obstacle."]
3167    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3168    #[doc = "Other type of aircraft not listed earlier."]
3169    MAV_ODID_UA_TYPE_OTHER = 15,
3170}
3171impl MavOdidUaType {
3172    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3173}
3174impl Default for MavOdidUaType {
3175    fn default() -> Self {
3176        Self::DEFAULT
3177    }
3178}
3179#[cfg_attr(feature = "ts", derive(TS))]
3180#[cfg_attr(feature = "ts", ts(export))]
3181#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3182#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3183#[cfg_attr(feature = "serde", serde(tag = "type"))]
3184#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3185#[repr(u32)]
3186pub enum MavOdidVerAcc {
3187    #[doc = "The vertical accuracy is unknown."]
3188    MAV_ODID_VER_ACC_UNKNOWN = 0,
3189    #[doc = "The vertical accuracy is smaller than 150 meter."]
3190    MAV_ODID_VER_ACC_150_METER = 1,
3191    #[doc = "The vertical accuracy is smaller than 45 meter."]
3192    MAV_ODID_VER_ACC_45_METER = 2,
3193    #[doc = "The vertical accuracy is smaller than 25 meter."]
3194    MAV_ODID_VER_ACC_25_METER = 3,
3195    #[doc = "The vertical accuracy is smaller than 10 meter."]
3196    MAV_ODID_VER_ACC_10_METER = 4,
3197    #[doc = "The vertical accuracy is smaller than 3 meter."]
3198    MAV_ODID_VER_ACC_3_METER = 5,
3199    #[doc = "The vertical accuracy is smaller than 1 meter."]
3200    MAV_ODID_VER_ACC_1_METER = 6,
3201}
3202impl MavOdidVerAcc {
3203    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3204}
3205impl Default for MavOdidVerAcc {
3206    fn default() -> Self {
3207        Self::DEFAULT
3208    }
3209}
3210#[cfg_attr(feature = "ts", derive(TS))]
3211#[cfg_attr(feature = "ts", ts(export))]
3212#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3213#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3214#[cfg_attr(feature = "serde", serde(tag = "type"))]
3215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3216#[repr(u32)]
3217#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3218pub enum MavParamExtType {
3219    #[doc = "8-bit unsigned integer"]
3220    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3221    #[doc = "8-bit signed integer"]
3222    MAV_PARAM_EXT_TYPE_INT8 = 2,
3223    #[doc = "16-bit unsigned integer"]
3224    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3225    #[doc = "16-bit signed integer"]
3226    MAV_PARAM_EXT_TYPE_INT16 = 4,
3227    #[doc = "32-bit unsigned integer"]
3228    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3229    #[doc = "32-bit signed integer"]
3230    MAV_PARAM_EXT_TYPE_INT32 = 6,
3231    #[doc = "64-bit unsigned integer"]
3232    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3233    #[doc = "64-bit signed integer"]
3234    MAV_PARAM_EXT_TYPE_INT64 = 8,
3235    #[doc = "32-bit floating-point"]
3236    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3237    #[doc = "64-bit floating-point"]
3238    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3239    #[doc = "Custom Type"]
3240    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3241}
3242impl MavParamExtType {
3243    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3244}
3245impl Default for MavParamExtType {
3246    fn default() -> Self {
3247        Self::DEFAULT
3248    }
3249}
3250#[cfg_attr(feature = "ts", derive(TS))]
3251#[cfg_attr(feature = "ts", ts(export))]
3252#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3253#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3254#[cfg_attr(feature = "serde", serde(tag = "type"))]
3255#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3256#[repr(u32)]
3257#[doc = "Specifies the datatype of a MAVLink parameter."]
3258pub enum MavParamType {
3259    #[doc = "8-bit unsigned integer"]
3260    MAV_PARAM_TYPE_UINT8 = 1,
3261    #[doc = "8-bit signed integer"]
3262    MAV_PARAM_TYPE_INT8 = 2,
3263    #[doc = "16-bit unsigned integer"]
3264    MAV_PARAM_TYPE_UINT16 = 3,
3265    #[doc = "16-bit signed integer"]
3266    MAV_PARAM_TYPE_INT16 = 4,
3267    #[doc = "32-bit unsigned integer"]
3268    MAV_PARAM_TYPE_UINT32 = 5,
3269    #[doc = "32-bit signed integer"]
3270    MAV_PARAM_TYPE_INT32 = 6,
3271    #[doc = "64-bit unsigned integer"]
3272    MAV_PARAM_TYPE_UINT64 = 7,
3273    #[doc = "64-bit signed integer"]
3274    MAV_PARAM_TYPE_INT64 = 8,
3275    #[doc = "32-bit floating-point"]
3276    MAV_PARAM_TYPE_REAL32 = 9,
3277    #[doc = "64-bit floating-point"]
3278    MAV_PARAM_TYPE_REAL64 = 10,
3279}
3280impl MavParamType {
3281    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3282}
3283impl Default for MavParamType {
3284    fn default() -> Self {
3285        Self::DEFAULT
3286    }
3287}
3288bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3289impl MavPowerStatus {
3290    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3291}
3292impl Default for MavPowerStatus {
3293    fn default() -> Self {
3294        Self::DEFAULT
3295    }
3296}
3297bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3298impl MavProtocolCapability {
3299    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3300}
3301impl Default for MavProtocolCapability {
3302    fn default() -> Self {
3303        Self::DEFAULT
3304    }
3305}
3306#[cfg_attr(feature = "ts", derive(TS))]
3307#[cfg_attr(feature = "ts", ts(export))]
3308#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3309#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3310#[cfg_attr(feature = "serde", serde(tag = "type"))]
3311#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3312#[repr(u32)]
3313#[doc = "Result from a MAVLink command (MAV_CMD)"]
3314pub enum MavResult {
3315    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3316    MAV_RESULT_ACCEPTED = 0,
3317    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3318    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3319    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3320    MAV_RESULT_DENIED = 2,
3321    #[doc = "Command is not supported (unknown)."]
3322    MAV_RESULT_UNSUPPORTED = 3,
3323    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3324    MAV_RESULT_FAILED = 4,
3325    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3326    MAV_RESULT_IN_PROGRESS = 5,
3327    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3328    MAV_RESULT_CANCELLED = 6,
3329    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3330    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3331    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3332    MAV_RESULT_COMMAND_INT_ONLY = 8,
3333    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3334    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3335}
3336impl MavResult {
3337    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3338}
3339impl Default for MavResult {
3340    fn default() -> Self {
3341        Self::DEFAULT
3342    }
3343}
3344#[cfg_attr(feature = "ts", derive(TS))]
3345#[cfg_attr(feature = "ts", ts(export))]
3346#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3347#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3348#[cfg_attr(feature = "serde", serde(tag = "type"))]
3349#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3350#[repr(u32)]
3351#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3352#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3353pub enum MavRoi {
3354    #[doc = "No region of interest."]
3355    MAV_ROI_NONE = 0,
3356    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3357    MAV_ROI_WPNEXT = 1,
3358    #[doc = "Point toward given waypoint."]
3359    MAV_ROI_WPINDEX = 2,
3360    #[doc = "Point toward fixed location."]
3361    MAV_ROI_LOCATION = 3,
3362    #[doc = "Point toward of given id."]
3363    MAV_ROI_TARGET = 4,
3364}
3365impl MavRoi {
3366    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3367}
3368impl Default for MavRoi {
3369    fn default() -> Self {
3370        Self::DEFAULT
3371    }
3372}
3373#[cfg_attr(feature = "ts", derive(TS))]
3374#[cfg_attr(feature = "ts", ts(export))]
3375#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3377#[cfg_attr(feature = "serde", serde(tag = "type"))]
3378#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3379#[repr(u32)]
3380#[doc = "Enumeration of sensor orientation, according to its rotations"]
3381pub enum MavSensorOrientation {
3382    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3383    MAV_SENSOR_ROTATION_NONE = 0,
3384    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3385    MAV_SENSOR_ROTATION_YAW_45 = 1,
3386    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3387    MAV_SENSOR_ROTATION_YAW_90 = 2,
3388    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3389    MAV_SENSOR_ROTATION_YAW_135 = 3,
3390    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3391    MAV_SENSOR_ROTATION_YAW_180 = 4,
3392    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3393    MAV_SENSOR_ROTATION_YAW_225 = 5,
3394    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3395    MAV_SENSOR_ROTATION_YAW_270 = 6,
3396    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3397    MAV_SENSOR_ROTATION_YAW_315 = 7,
3398    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3399    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3400    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3401    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3402    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3403    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3404    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3405    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3406    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3407    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3408    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3409    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3410    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3411    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3412    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3413    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3414    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3415    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3416    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3417    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3418    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3419    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3420    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3421    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3422    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3423    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3424    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3425    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3426    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3427    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3428    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3429    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3430    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3431    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3432    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3433    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3434    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3435    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3436    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3437    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3438    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3439    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3440    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3441    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3442    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3443    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3444    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3445    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3446    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3447    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3448    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3449    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3450    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3451    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3452    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3453    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3454    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3455    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3456    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3457    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3458    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3459    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3460    #[doc = "Pitch: 315"]
3461    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3462    #[doc = "Roll: 90, Pitch: 315"]
3463    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3464    #[doc = "Custom orientation"]
3465    MAV_SENSOR_ROTATION_CUSTOM = 100,
3466}
3467impl MavSensorOrientation {
3468    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3469}
3470impl Default for MavSensorOrientation {
3471    fn default() -> Self {
3472        Self::DEFAULT
3473    }
3474}
3475#[cfg_attr(feature = "ts", derive(TS))]
3476#[cfg_attr(feature = "ts", ts(export))]
3477#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3478#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3479#[cfg_attr(feature = "serde", serde(tag = "type"))]
3480#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3481#[repr(u32)]
3482#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3483pub enum MavSeverity {
3484    #[doc = "System is unusable. This is a \"panic\" condition."]
3485    MAV_SEVERITY_EMERGENCY = 0,
3486    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3487    MAV_SEVERITY_ALERT = 1,
3488    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3489    MAV_SEVERITY_CRITICAL = 2,
3490    #[doc = "Indicates an error in secondary/redundant systems."]
3491    MAV_SEVERITY_ERROR = 3,
3492    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3493    MAV_SEVERITY_WARNING = 4,
3494    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3495    MAV_SEVERITY_NOTICE = 5,
3496    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3497    MAV_SEVERITY_INFO = 6,
3498    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3499    MAV_SEVERITY_DEBUG = 7,
3500}
3501impl MavSeverity {
3502    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3503}
3504impl Default for MavSeverity {
3505    fn default() -> Self {
3506        Self::DEFAULT
3507    }
3508}
3509#[cfg_attr(feature = "ts", derive(TS))]
3510#[cfg_attr(feature = "ts", ts(export))]
3511#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3512#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3513#[cfg_attr(feature = "serde", serde(tag = "type"))]
3514#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3515#[repr(u32)]
3516#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3517pub enum MavStandardMode {
3518    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3519    MAV_STANDARD_MODE_NON_STANDARD = 0,
3520    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3521    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3522    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3523    MAV_STANDARD_MODE_ORBIT = 2,
3524    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3525    MAV_STANDARD_MODE_CRUISE = 3,
3526    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3527    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3528    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3529    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3530    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3531    MAV_STANDARD_MODE_MISSION = 6,
3532    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3533    MAV_STANDARD_MODE_LAND = 7,
3534    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3535    MAV_STANDARD_MODE_TAKEOFF = 8,
3536}
3537impl MavStandardMode {
3538    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3539}
3540impl Default for MavStandardMode {
3541    fn default() -> Self {
3542        Self::DEFAULT
3543    }
3544}
3545#[cfg_attr(feature = "ts", derive(TS))]
3546#[cfg_attr(feature = "ts", ts(export))]
3547#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3549#[cfg_attr(feature = "serde", serde(tag = "type"))]
3550#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3551#[repr(u32)]
3552pub enum MavState {
3553    #[doc = "Uninitialized system, state is unknown."]
3554    MAV_STATE_UNINIT = 0,
3555    #[doc = "System is booting up."]
3556    MAV_STATE_BOOT = 1,
3557    #[doc = "System is calibrating and not flight-ready."]
3558    MAV_STATE_CALIBRATING = 2,
3559    #[doc = "System is grounded and on standby. It can be launched any time."]
3560    MAV_STATE_STANDBY = 3,
3561    #[doc = "System is active and might be already airborne. Motors are engaged."]
3562    MAV_STATE_ACTIVE = 4,
3563    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3564    MAV_STATE_CRITICAL = 5,
3565    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3566    MAV_STATE_EMERGENCY = 6,
3567    #[doc = "System just initialized its power-down sequence, will shut down now."]
3568    MAV_STATE_POWEROFF = 7,
3569    #[doc = "System is terminating itself (failsafe or commanded)."]
3570    MAV_STATE_FLIGHT_TERMINATION = 8,
3571}
3572impl MavState {
3573    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3574}
3575impl Default for MavState {
3576    fn default() -> Self {
3577        Self::DEFAULT
3578    }
3579}
3580bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3581impl MavSysStatusSensor {
3582    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3583}
3584impl Default for MavSysStatusSensor {
3585    fn default() -> Self {
3586        Self::DEFAULT
3587    }
3588}
3589bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3590impl MavSysStatusSensorExtended {
3591    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3592}
3593impl Default for MavSysStatusSensorExtended {
3594    fn default() -> Self {
3595        Self::DEFAULT
3596    }
3597}
3598#[cfg_attr(feature = "ts", derive(TS))]
3599#[cfg_attr(feature = "ts", ts(export))]
3600#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3601#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3602#[cfg_attr(feature = "serde", serde(tag = "type"))]
3603#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3604#[repr(u32)]
3605pub enum MavTunnelPayloadType {
3606    #[doc = "Encoding of payload unknown."]
3607    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3608    #[doc = "Registered for STorM32 gimbal controller."]
3609    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3610    #[doc = "Registered for STorM32 gimbal controller."]
3611    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3612    #[doc = "Registered for STorM32 gimbal controller."]
3613    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3614    #[doc = "Registered for STorM32 gimbal controller."]
3615    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3616    #[doc = "Registered for STorM32 gimbal controller."]
3617    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3618    #[doc = "Registered for STorM32 gimbal controller."]
3619    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3620    #[doc = "Registered for STorM32 gimbal controller."]
3621    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3622    #[doc = "Registered for STorM32 gimbal controller."]
3623    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3624    #[doc = "Registered for STorM32 gimbal controller."]
3625    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3626    #[doc = "Registered for STorM32 gimbal controller."]
3627    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3628    #[doc = "Registered for ModalAI remote OSD protocol."]
3629    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3630    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3631    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3632    #[doc = "Registered for ModalAI vendor use."]
3633    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3634}
3635impl MavTunnelPayloadType {
3636    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3637}
3638impl Default for MavTunnelPayloadType {
3639    fn default() -> Self {
3640        Self::DEFAULT
3641    }
3642}
3643#[cfg_attr(feature = "ts", derive(TS))]
3644#[cfg_attr(feature = "ts", ts(export))]
3645#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3646#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3647#[cfg_attr(feature = "serde", serde(tag = "type"))]
3648#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3649#[repr(u32)]
3650#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3651pub enum MavType {
3652    #[doc = "Generic micro air vehicle"]
3653    MAV_TYPE_GENERIC = 0,
3654    #[doc = "Fixed wing aircraft."]
3655    MAV_TYPE_FIXED_WING = 1,
3656    #[doc = "Quadrotor"]
3657    MAV_TYPE_QUADROTOR = 2,
3658    #[doc = "Coaxial helicopter"]
3659    MAV_TYPE_COAXIAL = 3,
3660    #[doc = "Normal helicopter with tail rotor."]
3661    MAV_TYPE_HELICOPTER = 4,
3662    #[doc = "Ground installation"]
3663    MAV_TYPE_ANTENNA_TRACKER = 5,
3664    #[doc = "Operator control unit / ground control station"]
3665    MAV_TYPE_GCS = 6,
3666    #[doc = "Airship, controlled"]
3667    MAV_TYPE_AIRSHIP = 7,
3668    #[doc = "Free balloon, uncontrolled"]
3669    MAV_TYPE_FREE_BALLOON = 8,
3670    #[doc = "Rocket"]
3671    MAV_TYPE_ROCKET = 9,
3672    #[doc = "Ground rover"]
3673    MAV_TYPE_GROUND_ROVER = 10,
3674    #[doc = "Surface vessel, boat, ship"]
3675    MAV_TYPE_SURFACE_BOAT = 11,
3676    #[doc = "Submarine"]
3677    MAV_TYPE_SUBMARINE = 12,
3678    #[doc = "Hexarotor"]
3679    MAV_TYPE_HEXAROTOR = 13,
3680    #[doc = "Octorotor"]
3681    MAV_TYPE_OCTOROTOR = 14,
3682    #[doc = "Tricopter"]
3683    MAV_TYPE_TRICOPTER = 15,
3684    #[doc = "Flapping wing"]
3685    MAV_TYPE_FLAPPING_WING = 16,
3686    #[doc = "Kite"]
3687    MAV_TYPE_KITE = 17,
3688    #[doc = "Onboard companion controller"]
3689    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3690    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3691    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3692    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3693    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3694    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3695    MAV_TYPE_VTOL_TILTROTOR = 21,
3696    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3697    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3698    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3699    MAV_TYPE_VTOL_TAILSITTER = 23,
3700    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3701    MAV_TYPE_VTOL_TILTWING = 24,
3702    #[doc = "VTOL reserved 5"]
3703    MAV_TYPE_VTOL_RESERVED5 = 25,
3704    #[doc = "Gimbal"]
3705    MAV_TYPE_GIMBAL = 26,
3706    #[doc = "ADSB system"]
3707    MAV_TYPE_ADSB = 27,
3708    #[doc = "Steerable, nonrigid airfoil"]
3709    MAV_TYPE_PARAFOIL = 28,
3710    #[doc = "Dodecarotor"]
3711    MAV_TYPE_DODECAROTOR = 29,
3712    #[doc = "Camera"]
3713    MAV_TYPE_CAMERA = 30,
3714    #[doc = "Charging station"]
3715    MAV_TYPE_CHARGING_STATION = 31,
3716    #[doc = "FLARM collision avoidance system"]
3717    MAV_TYPE_FLARM = 32,
3718    #[doc = "Servo"]
3719    MAV_TYPE_SERVO = 33,
3720    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3721    MAV_TYPE_ODID = 34,
3722    #[doc = "Decarotor"]
3723    MAV_TYPE_DECAROTOR = 35,
3724    #[doc = "Battery"]
3725    MAV_TYPE_BATTERY = 36,
3726    #[doc = "Parachute"]
3727    MAV_TYPE_PARACHUTE = 37,
3728    #[doc = "Log"]
3729    MAV_TYPE_LOG = 38,
3730    #[doc = "OSD"]
3731    MAV_TYPE_OSD = 39,
3732    #[doc = "IMU"]
3733    MAV_TYPE_IMU = 40,
3734    #[doc = "GPS"]
3735    MAV_TYPE_GPS = 41,
3736    #[doc = "Winch"]
3737    MAV_TYPE_WINCH = 42,
3738    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3739    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3740    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3741    MAV_TYPE_ILLUMINATOR = 44,
3742    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3743    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3744}
3745impl MavType {
3746    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3747}
3748impl Default for MavType {
3749    fn default() -> Self {
3750        Self::DEFAULT
3751    }
3752}
3753#[cfg_attr(feature = "ts", derive(TS))]
3754#[cfg_attr(feature = "ts", ts(export))]
3755#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3756#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3757#[cfg_attr(feature = "serde", serde(tag = "type"))]
3758#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3759#[repr(u32)]
3760#[doc = "Enumeration of VTOL states"]
3761pub enum MavVtolState {
3762    #[doc = "MAV is not configured as VTOL"]
3763    MAV_VTOL_STATE_UNDEFINED = 0,
3764    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3765    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3766    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3767    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3768    #[doc = "VTOL is in multicopter state"]
3769    MAV_VTOL_STATE_MC = 3,
3770    #[doc = "VTOL is in fixed-wing state"]
3771    MAV_VTOL_STATE_FW = 4,
3772}
3773impl MavVtolState {
3774    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3775}
3776impl Default for MavVtolState {
3777    fn default() -> Self {
3778        Self::DEFAULT
3779    }
3780}
3781bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3782impl MavWinchStatusFlag {
3783    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3784}
3785impl Default for MavWinchStatusFlag {
3786    fn default() -> Self {
3787        Self::DEFAULT
3788    }
3789}
3790#[cfg_attr(feature = "ts", derive(TS))]
3791#[cfg_attr(feature = "ts", ts(export))]
3792#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3793#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3794#[cfg_attr(feature = "serde", serde(tag = "type"))]
3795#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3796#[repr(u32)]
3797pub enum MavlinkDataStreamType {
3798    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3799    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3800    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3801    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3802    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3803    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3804}
3805impl MavlinkDataStreamType {
3806    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3807}
3808impl Default for MavlinkDataStreamType {
3809    fn default() -> Self {
3810        Self::DEFAULT
3811    }
3812}
3813#[cfg_attr(feature = "ts", derive(TS))]
3814#[cfg_attr(feature = "ts", ts(export))]
3815#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3816#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3817#[cfg_attr(feature = "serde", serde(tag = "type"))]
3818#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3819#[repr(u32)]
3820#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3821pub enum MissionState {
3822    #[doc = "The mission status reporting is not supported."]
3823    MISSION_STATE_UNKNOWN = 0,
3824    #[doc = "No mission on the vehicle."]
3825    MISSION_STATE_NO_MISSION = 1,
3826    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3827    MISSION_STATE_NOT_STARTED = 2,
3828    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3829    MISSION_STATE_ACTIVE = 3,
3830    #[doc = "Mission is paused when in auto mode."]
3831    MISSION_STATE_PAUSED = 4,
3832    #[doc = "Mission has executed all mission items."]
3833    MISSION_STATE_COMPLETE = 5,
3834}
3835impl MissionState {
3836    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3837}
3838impl Default for MissionState {
3839    fn default() -> Self {
3840        Self::DEFAULT
3841    }
3842}
3843#[cfg_attr(feature = "ts", derive(TS))]
3844#[cfg_attr(feature = "ts", ts(export))]
3845#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3846#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3847#[cfg_attr(feature = "serde", serde(tag = "type"))]
3848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3849#[repr(u32)]
3850#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3851pub enum MotorTestOrder {
3852    #[doc = "Default autopilot motor test method."]
3853    MOTOR_TEST_ORDER_DEFAULT = 0,
3854    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3855    MOTOR_TEST_ORDER_SEQUENCE = 1,
3856    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3857    MOTOR_TEST_ORDER_BOARD = 2,
3858}
3859impl MotorTestOrder {
3860    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3861}
3862impl Default for MotorTestOrder {
3863    fn default() -> Self {
3864        Self::DEFAULT
3865    }
3866}
3867#[cfg_attr(feature = "ts", derive(TS))]
3868#[cfg_attr(feature = "ts", ts(export))]
3869#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3870#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3871#[cfg_attr(feature = "serde", serde(tag = "type"))]
3872#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3873#[repr(u32)]
3874#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3875pub enum MotorTestThrottleType {
3876    #[doc = "Throttle as a percentage (0 ~ 100)"]
3877    MOTOR_TEST_THROTTLE_PERCENT = 0,
3878    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3879    MOTOR_TEST_THROTTLE_PWM = 1,
3880    #[doc = "Throttle pass-through from pilot's transmitter."]
3881    MOTOR_TEST_THROTTLE_PILOT = 2,
3882    #[doc = "Per-motor compass calibration test."]
3883    MOTOR_TEST_COMPASS_CAL = 3,
3884}
3885impl MotorTestThrottleType {
3886    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3887}
3888impl Default for MotorTestThrottleType {
3889    fn default() -> Self {
3890        Self::DEFAULT
3891    }
3892}
3893#[cfg_attr(feature = "ts", derive(TS))]
3894#[cfg_attr(feature = "ts", ts(export))]
3895#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3896#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3897#[cfg_attr(feature = "serde", serde(tag = "type"))]
3898#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3899#[repr(u32)]
3900pub enum NavVtolLandOptions {
3901    #[doc = "Default autopilot landing behaviour."]
3902    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3903    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3904    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3905    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3906    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3907}
3908impl NavVtolLandOptions {
3909    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3910}
3911impl Default for NavVtolLandOptions {
3912    fn default() -> Self {
3913        Self::DEFAULT
3914    }
3915}
3916#[cfg_attr(feature = "ts", derive(TS))]
3917#[cfg_attr(feature = "ts", ts(export))]
3918#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3920#[cfg_attr(feature = "serde", serde(tag = "type"))]
3921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3922#[repr(u32)]
3923#[doc = "Yaw behaviour during orbit flight."]
3924pub enum OrbitYawBehaviour {
3925    #[doc = "Vehicle front points to the center (default)."]
3926    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3927    #[doc = "Vehicle front holds heading when message received."]
3928    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3929    #[doc = "Yaw uncontrolled."]
3930    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3931    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3932    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3933    #[doc = "Yaw controlled by RC input."]
3934    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3935    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3936    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3937}
3938impl OrbitYawBehaviour {
3939    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3940}
3941impl Default for OrbitYawBehaviour {
3942    fn default() -> Self {
3943        Self::DEFAULT
3944    }
3945}
3946#[cfg_attr(feature = "ts", derive(TS))]
3947#[cfg_attr(feature = "ts", ts(export))]
3948#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3949#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3950#[cfg_attr(feature = "serde", serde(tag = "type"))]
3951#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3952#[repr(u32)]
3953#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
3954pub enum ParachuteAction {
3955    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
3956    PARACHUTE_DISABLE = 0,
3957    #[doc = "Enable auto-release of parachute."]
3958    PARACHUTE_ENABLE = 1,
3959    #[doc = "Release parachute and kill motors."]
3960    PARACHUTE_RELEASE = 2,
3961}
3962impl ParachuteAction {
3963    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
3964}
3965impl Default for ParachuteAction {
3966    fn default() -> Self {
3967        Self::DEFAULT
3968    }
3969}
3970#[cfg_attr(feature = "ts", derive(TS))]
3971#[cfg_attr(feature = "ts", ts(export))]
3972#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3973#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3974#[cfg_attr(feature = "serde", serde(tag = "type"))]
3975#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3976#[repr(u32)]
3977#[doc = "Result from PARAM_EXT_SET message."]
3978pub enum ParamAck {
3979    #[doc = "Parameter value ACCEPTED and SET"]
3980    PARAM_ACK_ACCEPTED = 0,
3981    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
3982    PARAM_ACK_VALUE_UNSUPPORTED = 1,
3983    #[doc = "Parameter failed to set"]
3984    PARAM_ACK_FAILED = 2,
3985    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
3986    PARAM_ACK_IN_PROGRESS = 3,
3987}
3988impl ParamAck {
3989    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
3990}
3991impl Default for ParamAck {
3992    fn default() -> Self {
3993        Self::DEFAULT
3994    }
3995}
3996bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
3997impl PositionTargetTypemask {
3998    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
3999}
4000impl Default for PositionTargetTypemask {
4001    fn default() -> Self {
4002        Self::DEFAULT
4003    }
4004}
4005#[cfg_attr(feature = "ts", derive(TS))]
4006#[cfg_attr(feature = "ts", ts(export))]
4007#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4008#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4009#[cfg_attr(feature = "serde", serde(tag = "type"))]
4010#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4011#[repr(u32)]
4012#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4013pub enum PrecisionLandMode {
4014    #[doc = "Normal (non-precision) landing."]
4015    PRECISION_LAND_MODE_DISABLED = 0,
4016    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4017    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4018    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4019    PRECISION_LAND_MODE_REQUIRED = 2,
4020}
4021impl PrecisionLandMode {
4022    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4023}
4024impl Default for PrecisionLandMode {
4025    fn default() -> Self {
4026        Self::DEFAULT
4027    }
4028}
4029#[cfg_attr(feature = "ts", derive(TS))]
4030#[cfg_attr(feature = "ts", ts(export))]
4031#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4033#[cfg_attr(feature = "serde", serde(tag = "type"))]
4034#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4035#[repr(u32)]
4036#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4037pub enum PreflightStorageMissionAction {
4038    #[doc = "Read current mission data from persistent storage"]
4039    MISSION_READ_PERSISTENT = 0,
4040    #[doc = "Write current mission data to persistent storage"]
4041    MISSION_WRITE_PERSISTENT = 1,
4042    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4043    MISSION_RESET_DEFAULT = 2,
4044}
4045impl PreflightStorageMissionAction {
4046    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4047}
4048impl Default for PreflightStorageMissionAction {
4049    fn default() -> Self {
4050        Self::DEFAULT
4051    }
4052}
4053#[cfg_attr(feature = "ts", derive(TS))]
4054#[cfg_attr(feature = "ts", ts(export))]
4055#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4056#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4057#[cfg_attr(feature = "serde", serde(tag = "type"))]
4058#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4059#[repr(u32)]
4060#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4061pub enum PreflightStorageParameterAction {
4062    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4063    PARAM_READ_PERSISTENT = 0,
4064    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4065    PARAM_WRITE_PERSISTENT = 1,
4066    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4067    PARAM_RESET_CONFIG_DEFAULT = 2,
4068    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4069    PARAM_RESET_SENSOR_DEFAULT = 3,
4070    #[doc = "Reset all parameters, including operation counters, to default values"]
4071    PARAM_RESET_ALL_DEFAULT = 4,
4072}
4073impl PreflightStorageParameterAction {
4074    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4075}
4076impl Default for PreflightStorageParameterAction {
4077    fn default() -> Self {
4078        Self::DEFAULT
4079    }
4080}
4081#[cfg_attr(feature = "ts", derive(TS))]
4082#[cfg_attr(feature = "ts", ts(export))]
4083#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4085#[cfg_attr(feature = "serde", serde(tag = "type"))]
4086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4087#[repr(u32)]
4088#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4089pub enum RcSubType {
4090    #[doc = "Spektrum DSM2"]
4091    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4092    #[doc = "Spektrum DSMX"]
4093    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4094    #[doc = "Spektrum DSMX8"]
4095    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4096}
4097impl RcSubType {
4098    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4099}
4100impl Default for RcSubType {
4101    fn default() -> Self {
4102        Self::DEFAULT
4103    }
4104}
4105#[cfg_attr(feature = "ts", derive(TS))]
4106#[cfg_attr(feature = "ts", ts(export))]
4107#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4108#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4109#[cfg_attr(feature = "serde", serde(tag = "type"))]
4110#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4111#[repr(u32)]
4112#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4113pub enum RcType {
4114    #[doc = "Spektrum"]
4115    RC_TYPE_SPEKTRUM = 0,
4116    #[doc = "CRSF"]
4117    RC_TYPE_CRSF = 1,
4118}
4119impl RcType {
4120    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4121}
4122impl Default for RcType {
4123    fn default() -> Self {
4124        Self::DEFAULT
4125    }
4126}
4127#[cfg_attr(feature = "ts", derive(TS))]
4128#[cfg_attr(feature = "ts", ts(export))]
4129#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4131#[cfg_attr(feature = "serde", serde(tag = "type"))]
4132#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4133#[repr(u32)]
4134#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4135pub enum RebootShutdownConditions {
4136    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4137    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4138    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4139    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4140}
4141impl RebootShutdownConditions {
4142    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4143}
4144impl Default for RebootShutdownConditions {
4145    fn default() -> Self {
4146        Self::DEFAULT
4147    }
4148}
4149#[cfg_attr(feature = "ts", derive(TS))]
4150#[cfg_attr(feature = "ts", ts(export))]
4151#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4153#[cfg_attr(feature = "serde", serde(tag = "type"))]
4154#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4155#[repr(u32)]
4156#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4157pub enum RtkBaselineCoordinateSystem {
4158    #[doc = "Earth-centered, Earth-fixed"]
4159    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4160    #[doc = "RTK basestation centered, north, east, down"]
4161    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4162}
4163impl RtkBaselineCoordinateSystem {
4164    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4165}
4166impl Default for RtkBaselineCoordinateSystem {
4167    fn default() -> Self {
4168        Self::DEFAULT
4169    }
4170}
4171#[cfg_attr(feature = "ts", derive(TS))]
4172#[cfg_attr(feature = "ts", ts(export))]
4173#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4174#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4175#[cfg_attr(feature = "serde", serde(tag = "type"))]
4176#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4177#[repr(u32)]
4178#[doc = "Possible safety switch states."]
4179pub enum SafetySwitchState {
4180    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4181    SAFETY_SWITCH_STATE_SAFE = 0,
4182    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4183    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4184}
4185impl SafetySwitchState {
4186    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4187}
4188impl Default for SafetySwitchState {
4189    fn default() -> Self {
4190        Self::DEFAULT
4191    }
4192}
4193#[cfg_attr(feature = "ts", derive(TS))]
4194#[cfg_attr(feature = "ts", ts(export))]
4195#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4197#[cfg_attr(feature = "serde", serde(tag = "type"))]
4198#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4199#[repr(u32)]
4200#[doc = "SERIAL_CONTROL device types"]
4201pub enum SerialControlDev {
4202    #[doc = "First telemetry port"]
4203    SERIAL_CONTROL_DEV_TELEM1 = 0,
4204    #[doc = "Second telemetry port"]
4205    SERIAL_CONTROL_DEV_TELEM2 = 1,
4206    #[doc = "First GPS port"]
4207    SERIAL_CONTROL_DEV_GPS1 = 2,
4208    #[doc = "Second GPS port"]
4209    SERIAL_CONTROL_DEV_GPS2 = 3,
4210    #[doc = "system shell"]
4211    SERIAL_CONTROL_DEV_SHELL = 10,
4212    #[doc = "SERIAL0"]
4213    SERIAL_CONTROL_SERIAL0 = 100,
4214    #[doc = "SERIAL1"]
4215    SERIAL_CONTROL_SERIAL1 = 101,
4216    #[doc = "SERIAL2"]
4217    SERIAL_CONTROL_SERIAL2 = 102,
4218    #[doc = "SERIAL3"]
4219    SERIAL_CONTROL_SERIAL3 = 103,
4220    #[doc = "SERIAL4"]
4221    SERIAL_CONTROL_SERIAL4 = 104,
4222    #[doc = "SERIAL5"]
4223    SERIAL_CONTROL_SERIAL5 = 105,
4224    #[doc = "SERIAL6"]
4225    SERIAL_CONTROL_SERIAL6 = 106,
4226    #[doc = "SERIAL7"]
4227    SERIAL_CONTROL_SERIAL7 = 107,
4228    #[doc = "SERIAL8"]
4229    SERIAL_CONTROL_SERIAL8 = 108,
4230    #[doc = "SERIAL9"]
4231    SERIAL_CONTROL_SERIAL9 = 109,
4232}
4233impl SerialControlDev {
4234    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4235}
4236impl Default for SerialControlDev {
4237    fn default() -> Self {
4238        Self::DEFAULT
4239    }
4240}
4241bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4242impl SerialControlFlag {
4243    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4244}
4245impl Default for SerialControlFlag {
4246    fn default() -> Self {
4247        Self::DEFAULT
4248    }
4249}
4250#[cfg_attr(feature = "ts", derive(TS))]
4251#[cfg_attr(feature = "ts", ts(export))]
4252#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4253#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4254#[cfg_attr(feature = "serde", serde(tag = "type"))]
4255#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4256#[repr(u32)]
4257#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4258pub enum SetFocusType {
4259    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4260    FOCUS_TYPE_STEP = 0,
4261    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4262    FOCUS_TYPE_CONTINUOUS = 1,
4263    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4264    FOCUS_TYPE_RANGE = 2,
4265    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4266    FOCUS_TYPE_METERS = 3,
4267    #[doc = "Focus automatically."]
4268    FOCUS_TYPE_AUTO = 4,
4269    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4270    FOCUS_TYPE_AUTO_SINGLE = 5,
4271    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4272    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4273}
4274impl SetFocusType {
4275    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4276}
4277impl Default for SetFocusType {
4278    fn default() -> Self {
4279        Self::DEFAULT
4280    }
4281}
4282#[cfg_attr(feature = "ts", derive(TS))]
4283#[cfg_attr(feature = "ts", ts(export))]
4284#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4285#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4286#[cfg_attr(feature = "serde", serde(tag = "type"))]
4287#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4288#[repr(u32)]
4289#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4290pub enum SpeedType {
4291    #[doc = "Airspeed"]
4292    SPEED_TYPE_AIRSPEED = 0,
4293    #[doc = "Groundspeed"]
4294    SPEED_TYPE_GROUNDSPEED = 1,
4295    #[doc = "Climb speed"]
4296    SPEED_TYPE_CLIMB_SPEED = 2,
4297    #[doc = "Descent speed"]
4298    SPEED_TYPE_DESCENT_SPEED = 3,
4299}
4300impl SpeedType {
4301    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4302}
4303impl Default for SpeedType {
4304    fn default() -> Self {
4305        Self::DEFAULT
4306    }
4307}
4308#[cfg_attr(feature = "ts", derive(TS))]
4309#[cfg_attr(feature = "ts", ts(export))]
4310#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4312#[cfg_attr(feature = "serde", serde(tag = "type"))]
4313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4314#[repr(u32)]
4315#[doc = "Flags to indicate the status of camera storage."]
4316pub enum StorageStatus {
4317    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4318    STORAGE_STATUS_EMPTY = 0,
4319    #[doc = "Storage present but unformatted."]
4320    STORAGE_STATUS_UNFORMATTED = 1,
4321    #[doc = "Storage present and ready."]
4322    STORAGE_STATUS_READY = 2,
4323    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4324    STORAGE_STATUS_NOT_SUPPORTED = 3,
4325}
4326impl StorageStatus {
4327    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4328}
4329impl Default for StorageStatus {
4330    fn default() -> Self {
4331        Self::DEFAULT
4332    }
4333}
4334#[cfg_attr(feature = "ts", derive(TS))]
4335#[cfg_attr(feature = "ts", ts(export))]
4336#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4337#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4338#[cfg_attr(feature = "serde", serde(tag = "type"))]
4339#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4340#[repr(u32)]
4341#[doc = "Flags to indicate the type of storage."]
4342pub enum StorageType {
4343    #[doc = "Storage type is not known."]
4344    STORAGE_TYPE_UNKNOWN = 0,
4345    #[doc = "Storage type is USB device."]
4346    STORAGE_TYPE_USB_STICK = 1,
4347    #[doc = "Storage type is SD card."]
4348    STORAGE_TYPE_SD = 2,
4349    #[doc = "Storage type is microSD card."]
4350    STORAGE_TYPE_MICROSD = 3,
4351    #[doc = "Storage type is CFast."]
4352    STORAGE_TYPE_CF = 4,
4353    #[doc = "Storage type is CFexpress."]
4354    STORAGE_TYPE_CFE = 5,
4355    #[doc = "Storage type is XQD."]
4356    STORAGE_TYPE_XQD = 6,
4357    #[doc = "Storage type is HD mass storage type."]
4358    STORAGE_TYPE_HD = 7,
4359    #[doc = "Storage type is other, not listed type."]
4360    STORAGE_TYPE_OTHER = 254,
4361}
4362impl StorageType {
4363    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4364}
4365impl Default for StorageType {
4366    fn default() -> Self {
4367        Self::DEFAULT
4368    }
4369}
4370bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4371impl StorageUsageFlag {
4372    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4373}
4374impl Default for StorageUsageFlag {
4375    fn default() -> Self {
4376        Self::DEFAULT
4377    }
4378}
4379#[cfg_attr(feature = "ts", derive(TS))]
4380#[cfg_attr(feature = "ts", ts(export))]
4381#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4382#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4383#[cfg_attr(feature = "serde", serde(tag = "type"))]
4384#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4385#[repr(u32)]
4386#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4387pub enum TuneFormat {
4388    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4389    TUNE_FORMAT_QBASIC1_1 = 1,
4390    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4391    TUNE_FORMAT_MML_MODERN = 2,
4392}
4393impl TuneFormat {
4394    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4395}
4396impl Default for TuneFormat {
4397    fn default() -> Self {
4398        Self::DEFAULT
4399    }
4400}
4401#[cfg_attr(feature = "ts", derive(TS))]
4402#[cfg_attr(feature = "ts", ts(export))]
4403#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4404#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4405#[cfg_attr(feature = "serde", serde(tag = "type"))]
4406#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4407#[repr(u32)]
4408#[doc = "Available autopilot modes for ualberta uav"]
4409pub enum UalbertaAutopilotMode {
4410    #[doc = "Raw input pulse widts sent to output"]
4411    MODE_MANUAL_DIRECT = 1,
4412    #[doc = "Inputs are normalized using calibration, the converted back to raw pulse widths for output"]
4413    MODE_MANUAL_SCALED = 2,
4414    MODE_AUTO_PID_ATT = 3,
4415    MODE_AUTO_PID_VEL = 4,
4416    MODE_AUTO_PID_POS = 5,
4417}
4418impl UalbertaAutopilotMode {
4419    pub const DEFAULT: Self = Self::MODE_MANUAL_DIRECT;
4420}
4421impl Default for UalbertaAutopilotMode {
4422    fn default() -> Self {
4423        Self::DEFAULT
4424    }
4425}
4426#[cfg_attr(feature = "ts", derive(TS))]
4427#[cfg_attr(feature = "ts", ts(export))]
4428#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4429#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4430#[cfg_attr(feature = "serde", serde(tag = "type"))]
4431#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4432#[repr(u32)]
4433#[doc = "Navigation filter mode"]
4434pub enum UalbertaNavMode {
4435    NAV_AHRS_INIT = 1,
4436    #[doc = "AHRS mode"]
4437    NAV_AHRS = 2,
4438    #[doc = "INS/GPS initialization mode"]
4439    NAV_INS_GPS_INIT = 3,
4440    #[doc = "INS/GPS mode"]
4441    NAV_INS_GPS = 4,
4442}
4443impl UalbertaNavMode {
4444    pub const DEFAULT: Self = Self::NAV_AHRS_INIT;
4445}
4446impl Default for UalbertaNavMode {
4447    fn default() -> Self {
4448        Self::DEFAULT
4449    }
4450}
4451#[cfg_attr(feature = "ts", derive(TS))]
4452#[cfg_attr(feature = "ts", ts(export))]
4453#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4454#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4455#[cfg_attr(feature = "serde", serde(tag = "type"))]
4456#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4457#[repr(u32)]
4458#[doc = "Mode currently commanded by pilot"]
4459pub enum UalbertaPilotMode {
4460    PILOT_MANUAL = 1,
4461    PILOT_AUTO = 2,
4462    #[doc = "Rotomotion mode"]
4463    PILOT_ROTO = 3,
4464}
4465impl UalbertaPilotMode {
4466    pub const DEFAULT: Self = Self::PILOT_MANUAL;
4467}
4468impl Default for UalbertaPilotMode {
4469    fn default() -> Self {
4470        Self::DEFAULT
4471    }
4472}
4473#[cfg_attr(feature = "ts", derive(TS))]
4474#[cfg_attr(feature = "ts", ts(export))]
4475#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4476#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4477#[cfg_attr(feature = "serde", serde(tag = "type"))]
4478#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4479#[repr(u32)]
4480#[doc = "Generalized UAVCAN node health"]
4481pub enum UavcanNodeHealth {
4482    #[doc = "The node is functioning properly."]
4483    UAVCAN_NODE_HEALTH_OK = 0,
4484    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4485    UAVCAN_NODE_HEALTH_WARNING = 1,
4486    #[doc = "The node has encountered a major failure."]
4487    UAVCAN_NODE_HEALTH_ERROR = 2,
4488    #[doc = "The node has suffered a fatal malfunction."]
4489    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4490}
4491impl UavcanNodeHealth {
4492    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4493}
4494impl Default for UavcanNodeHealth {
4495    fn default() -> Self {
4496        Self::DEFAULT
4497    }
4498}
4499#[cfg_attr(feature = "ts", derive(TS))]
4500#[cfg_attr(feature = "ts", ts(export))]
4501#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4502#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4503#[cfg_attr(feature = "serde", serde(tag = "type"))]
4504#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4505#[repr(u32)]
4506#[doc = "Generalized UAVCAN node mode"]
4507pub enum UavcanNodeMode {
4508    #[doc = "The node is performing its primary functions."]
4509    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4510    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4511    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4512    #[doc = "The node is under maintenance."]
4513    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4514    #[doc = "The node is in the process of updating its software."]
4515    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4516    #[doc = "The node is no longer available online."]
4517    UAVCAN_NODE_MODE_OFFLINE = 7,
4518}
4519impl UavcanNodeMode {
4520    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4521}
4522impl Default for UavcanNodeMode {
4523    fn default() -> Self {
4524        Self::DEFAULT
4525    }
4526}
4527bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4528impl UtmDataAvailFlags {
4529    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4530}
4531impl Default for UtmDataAvailFlags {
4532    fn default() -> Self {
4533        Self::DEFAULT
4534    }
4535}
4536#[cfg_attr(feature = "ts", derive(TS))]
4537#[cfg_attr(feature = "ts", ts(export))]
4538#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4539#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4540#[cfg_attr(feature = "serde", serde(tag = "type"))]
4541#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4542#[repr(u32)]
4543#[doc = "Airborne status of UAS."]
4544pub enum UtmFlightState {
4545    #[doc = "The flight state can't be determined."]
4546    UTM_FLIGHT_STATE_UNKNOWN = 1,
4547    #[doc = "UAS on ground."]
4548    UTM_FLIGHT_STATE_GROUND = 2,
4549    #[doc = "UAS airborne."]
4550    UTM_FLIGHT_STATE_AIRBORNE = 3,
4551    #[doc = "UAS is in an emergency flight state."]
4552    UTM_FLIGHT_STATE_EMERGENCY = 16,
4553    #[doc = "UAS has no active controls."]
4554    UTM_FLIGHT_STATE_NOCTRL = 32,
4555}
4556impl UtmFlightState {
4557    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4558}
4559impl Default for UtmFlightState {
4560    fn default() -> Self {
4561        Self::DEFAULT
4562    }
4563}
4564#[cfg_attr(feature = "ts", derive(TS))]
4565#[cfg_attr(feature = "ts", ts(export))]
4566#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4567#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4568#[cfg_attr(feature = "serde", serde(tag = "type"))]
4569#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4570#[repr(u32)]
4571#[doc = "Video stream encodings"]
4572pub enum VideoStreamEncoding {
4573    #[doc = "Stream encoding is unknown"]
4574    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4575    #[doc = "Stream encoding is H.264"]
4576    VIDEO_STREAM_ENCODING_H264 = 1,
4577    #[doc = "Stream encoding is H.265"]
4578    VIDEO_STREAM_ENCODING_H265 = 2,
4579}
4580impl VideoStreamEncoding {
4581    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4582}
4583impl Default for VideoStreamEncoding {
4584    fn default() -> Self {
4585        Self::DEFAULT
4586    }
4587}
4588bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4589impl VideoStreamStatusFlags {
4590    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4591}
4592impl Default for VideoStreamStatusFlags {
4593    fn default() -> Self {
4594        Self::DEFAULT
4595    }
4596}
4597#[cfg_attr(feature = "ts", derive(TS))]
4598#[cfg_attr(feature = "ts", ts(export))]
4599#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4600#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4601#[cfg_attr(feature = "serde", serde(tag = "type"))]
4602#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4603#[repr(u32)]
4604#[doc = "Video stream types"]
4605pub enum VideoStreamType {
4606    #[doc = "Stream is RTSP"]
4607    VIDEO_STREAM_TYPE_RTSP = 0,
4608    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4609    VIDEO_STREAM_TYPE_RTPUDP = 1,
4610    #[doc = "Stream is MPEG on TCP"]
4611    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4612    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4613    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4614}
4615impl VideoStreamType {
4616    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4617}
4618impl Default for VideoStreamType {
4619    fn default() -> Self {
4620        Self::DEFAULT
4621    }
4622}
4623#[cfg_attr(feature = "ts", derive(TS))]
4624#[cfg_attr(feature = "ts", ts(export))]
4625#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4626#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4627#[cfg_attr(feature = "serde", serde(tag = "type"))]
4628#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4629#[repr(u32)]
4630#[doc = "Direction of VTOL transition"]
4631pub enum VtolTransitionHeading {
4632    #[doc = "Respect the heading configuration of the vehicle."]
4633    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4634    #[doc = "Use the heading pointing towards the next waypoint."]
4635    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4636    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4637    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4638    #[doc = "Use the specified heading in parameter 4."]
4639    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4640    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4641    VTOL_TRANSITION_HEADING_ANY = 4,
4642}
4643impl VtolTransitionHeading {
4644    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4645}
4646impl Default for VtolTransitionHeading {
4647    fn default() -> Self {
4648        Self::DEFAULT
4649    }
4650}
4651#[cfg_attr(feature = "ts", derive(TS))]
4652#[cfg_attr(feature = "ts", ts(export))]
4653#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4654#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4655#[cfg_attr(feature = "serde", serde(tag = "type"))]
4656#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4657#[repr(u32)]
4658#[doc = "WiFi Mode."]
4659pub enum WifiConfigApMode {
4660    #[doc = "WiFi mode is undefined."]
4661    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4662    #[doc = "WiFi configured as an access point."]
4663    WIFI_CONFIG_AP_MODE_AP = 1,
4664    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4665    WIFI_CONFIG_AP_MODE_STATION = 2,
4666    #[doc = "WiFi disabled."]
4667    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4668}
4669impl WifiConfigApMode {
4670    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4671}
4672impl Default for WifiConfigApMode {
4673    fn default() -> Self {
4674        Self::DEFAULT
4675    }
4676}
4677#[cfg_attr(feature = "ts", derive(TS))]
4678#[cfg_attr(feature = "ts", ts(export))]
4679#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4680#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4681#[cfg_attr(feature = "serde", serde(tag = "type"))]
4682#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4683#[repr(u32)]
4684#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4685pub enum WifiConfigApResponse {
4686    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4687    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4688    #[doc = "Changes accepted."]
4689    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4690    #[doc = "Changes rejected."]
4691    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4692    #[doc = "Invalid Mode."]
4693    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4694    #[doc = "Invalid SSID."]
4695    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4696    #[doc = "Invalid Password."]
4697    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4698}
4699impl WifiConfigApResponse {
4700    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4701}
4702impl Default for WifiConfigApResponse {
4703    fn default() -> Self {
4704        Self::DEFAULT
4705    }
4706}
4707#[cfg_attr(feature = "ts", derive(TS))]
4708#[cfg_attr(feature = "ts", ts(export))]
4709#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4710#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4711#[cfg_attr(feature = "serde", serde(tag = "type"))]
4712#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4713#[repr(u32)]
4714#[doc = "Winch actions."]
4715pub enum WinchActions {
4716    #[doc = "Allow motor to freewheel."]
4717    WINCH_RELAXED = 0,
4718    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4719    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4720    #[doc = "Wind or unwind line at specified rate."]
4721    WINCH_RATE_CONTROL = 2,
4722    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4723    WINCH_LOCK = 3,
4724    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4725    WINCH_DELIVER = 4,
4726    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4727    WINCH_HOLD = 5,
4728    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4729    WINCH_RETRACT = 6,
4730    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4731    WINCH_LOAD_LINE = 7,
4732    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4733    WINCH_ABANDON_LINE = 8,
4734    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4735    WINCH_LOAD_PAYLOAD = 9,
4736}
4737impl WinchActions {
4738    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4739}
4740impl Default for WinchActions {
4741    fn default() -> Self {
4742        Self::DEFAULT
4743    }
4744}
4745#[doc = "Set the vehicle attitude and body angular rates."]
4746#[doc = ""]
4747#[doc = "ID: 140"]
4748#[derive(Debug, Clone, PartialEq)]
4749#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4750#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4751#[cfg_attr(feature = "ts", derive(TS))]
4752#[cfg_attr(feature = "ts", ts(export))]
4753pub struct ACTUATOR_CONTROL_TARGET_DATA {
4754    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4755    pub time_usec: u64,
4756    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4757    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4758    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4759    pub controls: [f32; 8],
4760    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4761    pub group_mlx: u8,
4762}
4763impl ACTUATOR_CONTROL_TARGET_DATA {
4764    pub const ENCODED_LEN: usize = 41usize;
4765    pub const DEFAULT: Self = Self {
4766        time_usec: 0_u64,
4767        controls: [0.0_f32; 8usize],
4768        group_mlx: 0_u8,
4769    };
4770    #[cfg(feature = "arbitrary")]
4771    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4772        use arbitrary::{Arbitrary, Unstructured};
4773        let mut buf = [0u8; 1024];
4774        rng.fill_bytes(&mut buf);
4775        let mut unstructured = Unstructured::new(&buf);
4776        Self::arbitrary(&mut unstructured).unwrap_or_default()
4777    }
4778}
4779impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4780    fn default() -> Self {
4781        Self::DEFAULT.clone()
4782    }
4783}
4784impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4785    type Message = MavMessage;
4786    const ID: u32 = 140u32;
4787    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4788    const EXTRA_CRC: u8 = 181u8;
4789    const ENCODED_LEN: usize = 41usize;
4790    fn deser(
4791        _version: MavlinkVersion,
4792        __input: &[u8],
4793    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4794        let avail_len = __input.len();
4795        let mut payload_buf = [0; Self::ENCODED_LEN];
4796        let mut buf = if avail_len < Self::ENCODED_LEN {
4797            payload_buf[0..avail_len].copy_from_slice(__input);
4798            Bytes::new(&payload_buf)
4799        } else {
4800            Bytes::new(__input)
4801        };
4802        let mut __struct = Self::default();
4803        __struct.time_usec = buf.get_u64_le();
4804        for v in &mut __struct.controls {
4805            let val = buf.get_f32_le();
4806            *v = val;
4807        }
4808        __struct.group_mlx = buf.get_u8();
4809        Ok(__struct)
4810    }
4811    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4812        let mut __tmp = BytesMut::new(bytes);
4813        #[allow(clippy::absurd_extreme_comparisons)]
4814        #[allow(unused_comparisons)]
4815        if __tmp.remaining() < Self::ENCODED_LEN {
4816            panic!(
4817                "buffer is too small (need {} bytes, but got {})",
4818                Self::ENCODED_LEN,
4819                __tmp.remaining(),
4820            )
4821        }
4822        __tmp.put_u64_le(self.time_usec);
4823        for val in &self.controls {
4824            __tmp.put_f32_le(*val);
4825        }
4826        __tmp.put_u8(self.group_mlx);
4827        if matches!(version, MavlinkVersion::V2) {
4828            let len = __tmp.len();
4829            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4830        } else {
4831            __tmp.len()
4832        }
4833    }
4834}
4835#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4836#[doc = ""]
4837#[doc = "ID: 375"]
4838#[derive(Debug, Clone, PartialEq)]
4839#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4840#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4841#[cfg_attr(feature = "ts", derive(TS))]
4842#[cfg_attr(feature = "ts", ts(export))]
4843pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4844    #[doc = "Timestamp (since system boot)."]
4845    pub time_usec: u64,
4846    #[doc = "Active outputs"]
4847    pub active: u32,
4848    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4849    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4850    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4851    pub actuator: [f32; 32],
4852}
4853impl ACTUATOR_OUTPUT_STATUS_DATA {
4854    pub const ENCODED_LEN: usize = 140usize;
4855    pub const DEFAULT: Self = Self {
4856        time_usec: 0_u64,
4857        active: 0_u32,
4858        actuator: [0.0_f32; 32usize],
4859    };
4860    #[cfg(feature = "arbitrary")]
4861    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4862        use arbitrary::{Arbitrary, Unstructured};
4863        let mut buf = [0u8; 1024];
4864        rng.fill_bytes(&mut buf);
4865        let mut unstructured = Unstructured::new(&buf);
4866        Self::arbitrary(&mut unstructured).unwrap_or_default()
4867    }
4868}
4869impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4870    fn default() -> Self {
4871        Self::DEFAULT.clone()
4872    }
4873}
4874impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4875    type Message = MavMessage;
4876    const ID: u32 = 375u32;
4877    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4878    const EXTRA_CRC: u8 = 251u8;
4879    const ENCODED_LEN: usize = 140usize;
4880    fn deser(
4881        _version: MavlinkVersion,
4882        __input: &[u8],
4883    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4884        let avail_len = __input.len();
4885        let mut payload_buf = [0; Self::ENCODED_LEN];
4886        let mut buf = if avail_len < Self::ENCODED_LEN {
4887            payload_buf[0..avail_len].copy_from_slice(__input);
4888            Bytes::new(&payload_buf)
4889        } else {
4890            Bytes::new(__input)
4891        };
4892        let mut __struct = Self::default();
4893        __struct.time_usec = buf.get_u64_le();
4894        __struct.active = buf.get_u32_le();
4895        for v in &mut __struct.actuator {
4896            let val = buf.get_f32_le();
4897            *v = val;
4898        }
4899        Ok(__struct)
4900    }
4901    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4902        let mut __tmp = BytesMut::new(bytes);
4903        #[allow(clippy::absurd_extreme_comparisons)]
4904        #[allow(unused_comparisons)]
4905        if __tmp.remaining() < Self::ENCODED_LEN {
4906            panic!(
4907                "buffer is too small (need {} bytes, but got {})",
4908                Self::ENCODED_LEN,
4909                __tmp.remaining(),
4910            )
4911        }
4912        __tmp.put_u64_le(self.time_usec);
4913        __tmp.put_u32_le(self.active);
4914        for val in &self.actuator {
4915            __tmp.put_f32_le(*val);
4916        }
4917        if matches!(version, MavlinkVersion::V2) {
4918            let len = __tmp.len();
4919            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4920        } else {
4921            __tmp.len()
4922        }
4923    }
4924}
4925#[doc = "The location and information of an ADSB vehicle."]
4926#[doc = ""]
4927#[doc = "ID: 246"]
4928#[derive(Debug, Clone, PartialEq)]
4929#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4930#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4931#[cfg_attr(feature = "ts", derive(TS))]
4932#[cfg_attr(feature = "ts", ts(export))]
4933pub struct ADSB_VEHICLE_DATA {
4934    #[doc = "ICAO address"]
4935    pub ICAO_address: u32,
4936    #[doc = "Latitude"]
4937    pub lat: i32,
4938    #[doc = "Longitude"]
4939    pub lon: i32,
4940    #[doc = "Altitude(ASL)"]
4941    pub altitude: i32,
4942    #[doc = "Course over ground"]
4943    pub heading: u16,
4944    #[doc = "The horizontal velocity"]
4945    pub hor_velocity: u16,
4946    #[doc = "The vertical velocity. Positive is up"]
4947    pub ver_velocity: i16,
4948    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4949    pub flags: AdsbFlags,
4950    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4951    pub squawk: u16,
4952    #[doc = "ADSB altitude type."]
4953    pub altitude_type: AdsbAltitudeType,
4954    #[doc = "The callsign, 8+null"]
4955    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4956    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4957    pub callsign: [u8; 9],
4958    #[doc = "ADSB emitter type."]
4959    pub emitter_type: AdsbEmitterType,
4960    #[doc = "Time since last communication in seconds"]
4961    pub tslc: u8,
4962}
4963impl ADSB_VEHICLE_DATA {
4964    pub const ENCODED_LEN: usize = 38usize;
4965    pub const DEFAULT: Self = Self {
4966        ICAO_address: 0_u32,
4967        lat: 0_i32,
4968        lon: 0_i32,
4969        altitude: 0_i32,
4970        heading: 0_u16,
4971        hor_velocity: 0_u16,
4972        ver_velocity: 0_i16,
4973        flags: AdsbFlags::DEFAULT,
4974        squawk: 0_u16,
4975        altitude_type: AdsbAltitudeType::DEFAULT,
4976        callsign: [0_u8; 9usize],
4977        emitter_type: AdsbEmitterType::DEFAULT,
4978        tslc: 0_u8,
4979    };
4980    #[cfg(feature = "arbitrary")]
4981    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4982        use arbitrary::{Arbitrary, Unstructured};
4983        let mut buf = [0u8; 1024];
4984        rng.fill_bytes(&mut buf);
4985        let mut unstructured = Unstructured::new(&buf);
4986        Self::arbitrary(&mut unstructured).unwrap_or_default()
4987    }
4988}
4989impl Default for ADSB_VEHICLE_DATA {
4990    fn default() -> Self {
4991        Self::DEFAULT.clone()
4992    }
4993}
4994impl MessageData for ADSB_VEHICLE_DATA {
4995    type Message = MavMessage;
4996    const ID: u32 = 246u32;
4997    const NAME: &'static str = "ADSB_VEHICLE";
4998    const EXTRA_CRC: u8 = 184u8;
4999    const ENCODED_LEN: usize = 38usize;
5000    fn deser(
5001        _version: MavlinkVersion,
5002        __input: &[u8],
5003    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5004        let avail_len = __input.len();
5005        let mut payload_buf = [0; Self::ENCODED_LEN];
5006        let mut buf = if avail_len < Self::ENCODED_LEN {
5007            payload_buf[0..avail_len].copy_from_slice(__input);
5008            Bytes::new(&payload_buf)
5009        } else {
5010            Bytes::new(__input)
5011        };
5012        let mut __struct = Self::default();
5013        __struct.ICAO_address = buf.get_u32_le();
5014        __struct.lat = buf.get_i32_le();
5015        __struct.lon = buf.get_i32_le();
5016        __struct.altitude = buf.get_i32_le();
5017        __struct.heading = buf.get_u16_le();
5018        __struct.hor_velocity = buf.get_u16_le();
5019        __struct.ver_velocity = buf.get_i16_le();
5020        let tmp = buf.get_u16_le();
5021        __struct.flags = AdsbFlags::from_bits(tmp & AdsbFlags::all().bits()).ok_or(
5022            ::mavlink_core::error::ParserError::InvalidFlag {
5023                flag_type: "AdsbFlags",
5024                value: tmp as u32,
5025            },
5026        )?;
5027        __struct.squawk = buf.get_u16_le();
5028        let tmp = buf.get_u8();
5029        __struct.altitude_type =
5030            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5031                enum_type: "AdsbAltitudeType",
5032                value: tmp as u32,
5033            })?;
5034        for v in &mut __struct.callsign {
5035            let val = buf.get_u8();
5036            *v = val;
5037        }
5038        let tmp = buf.get_u8();
5039        __struct.emitter_type =
5040            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5041                enum_type: "AdsbEmitterType",
5042                value: tmp as u32,
5043            })?;
5044        __struct.tslc = buf.get_u8();
5045        Ok(__struct)
5046    }
5047    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5048        let mut __tmp = BytesMut::new(bytes);
5049        #[allow(clippy::absurd_extreme_comparisons)]
5050        #[allow(unused_comparisons)]
5051        if __tmp.remaining() < Self::ENCODED_LEN {
5052            panic!(
5053                "buffer is too small (need {} bytes, but got {})",
5054                Self::ENCODED_LEN,
5055                __tmp.remaining(),
5056            )
5057        }
5058        __tmp.put_u32_le(self.ICAO_address);
5059        __tmp.put_i32_le(self.lat);
5060        __tmp.put_i32_le(self.lon);
5061        __tmp.put_i32_le(self.altitude);
5062        __tmp.put_u16_le(self.heading);
5063        __tmp.put_u16_le(self.hor_velocity);
5064        __tmp.put_i16_le(self.ver_velocity);
5065        __tmp.put_u16_le(self.flags.bits());
5066        __tmp.put_u16_le(self.squawk);
5067        __tmp.put_u8(self.altitude_type as u8);
5068        for val in &self.callsign {
5069            __tmp.put_u8(*val);
5070        }
5071        __tmp.put_u8(self.emitter_type as u8);
5072        __tmp.put_u8(self.tslc);
5073        if matches!(version, MavlinkVersion::V2) {
5074            let len = __tmp.len();
5075            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5076        } else {
5077            __tmp.len()
5078        }
5079    }
5080}
5081#[doc = "The location and information of an AIS vessel."]
5082#[doc = ""]
5083#[doc = "ID: 301"]
5084#[derive(Debug, Clone, PartialEq)]
5085#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5087#[cfg_attr(feature = "ts", derive(TS))]
5088#[cfg_attr(feature = "ts", ts(export))]
5089pub struct AIS_VESSEL_DATA {
5090    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5091    pub MMSI: u32,
5092    #[doc = "Latitude"]
5093    pub lat: i32,
5094    #[doc = "Longitude"]
5095    pub lon: i32,
5096    #[doc = "Course over ground"]
5097    pub COG: u16,
5098    #[doc = "True heading"]
5099    pub heading: u16,
5100    #[doc = "Speed over ground"]
5101    pub velocity: u16,
5102    #[doc = "Distance from lat/lon location to bow"]
5103    pub dimension_bow: u16,
5104    #[doc = "Distance from lat/lon location to stern"]
5105    pub dimension_stern: u16,
5106    #[doc = "Time since last communication in seconds"]
5107    pub tslc: u16,
5108    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5109    pub flags: AisFlags,
5110    #[doc = "Turn rate"]
5111    pub turn_rate: i8,
5112    #[doc = "Navigational status"]
5113    pub navigational_status: AisNavStatus,
5114    #[doc = "Type of vessels"]
5115    pub mavtype: AisType,
5116    #[doc = "Distance from lat/lon location to port side"]
5117    pub dimension_port: u8,
5118    #[doc = "Distance from lat/lon location to starboard side"]
5119    pub dimension_starboard: u8,
5120    #[doc = "The vessel callsign"]
5121    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5122    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5123    pub callsign: [u8; 7],
5124    #[doc = "The vessel name"]
5125    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5126    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5127    pub name: [u8; 20],
5128}
5129impl AIS_VESSEL_DATA {
5130    pub const ENCODED_LEN: usize = 58usize;
5131    pub const DEFAULT: Self = Self {
5132        MMSI: 0_u32,
5133        lat: 0_i32,
5134        lon: 0_i32,
5135        COG: 0_u16,
5136        heading: 0_u16,
5137        velocity: 0_u16,
5138        dimension_bow: 0_u16,
5139        dimension_stern: 0_u16,
5140        tslc: 0_u16,
5141        flags: AisFlags::DEFAULT,
5142        turn_rate: 0_i8,
5143        navigational_status: AisNavStatus::DEFAULT,
5144        mavtype: AisType::DEFAULT,
5145        dimension_port: 0_u8,
5146        dimension_starboard: 0_u8,
5147        callsign: [0_u8; 7usize],
5148        name: [0_u8; 20usize],
5149    };
5150    #[cfg(feature = "arbitrary")]
5151    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5152        use arbitrary::{Arbitrary, Unstructured};
5153        let mut buf = [0u8; 1024];
5154        rng.fill_bytes(&mut buf);
5155        let mut unstructured = Unstructured::new(&buf);
5156        Self::arbitrary(&mut unstructured).unwrap_or_default()
5157    }
5158}
5159impl Default for AIS_VESSEL_DATA {
5160    fn default() -> Self {
5161        Self::DEFAULT.clone()
5162    }
5163}
5164impl MessageData for AIS_VESSEL_DATA {
5165    type Message = MavMessage;
5166    const ID: u32 = 301u32;
5167    const NAME: &'static str = "AIS_VESSEL";
5168    const EXTRA_CRC: u8 = 243u8;
5169    const ENCODED_LEN: usize = 58usize;
5170    fn deser(
5171        _version: MavlinkVersion,
5172        __input: &[u8],
5173    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5174        let avail_len = __input.len();
5175        let mut payload_buf = [0; Self::ENCODED_LEN];
5176        let mut buf = if avail_len < Self::ENCODED_LEN {
5177            payload_buf[0..avail_len].copy_from_slice(__input);
5178            Bytes::new(&payload_buf)
5179        } else {
5180            Bytes::new(__input)
5181        };
5182        let mut __struct = Self::default();
5183        __struct.MMSI = buf.get_u32_le();
5184        __struct.lat = buf.get_i32_le();
5185        __struct.lon = buf.get_i32_le();
5186        __struct.COG = buf.get_u16_le();
5187        __struct.heading = buf.get_u16_le();
5188        __struct.velocity = buf.get_u16_le();
5189        __struct.dimension_bow = buf.get_u16_le();
5190        __struct.dimension_stern = buf.get_u16_le();
5191        __struct.tslc = buf.get_u16_le();
5192        let tmp = buf.get_u16_le();
5193        __struct.flags = AisFlags::from_bits(tmp & AisFlags::all().bits()).ok_or(
5194            ::mavlink_core::error::ParserError::InvalidFlag {
5195                flag_type: "AisFlags",
5196                value: tmp as u32,
5197            },
5198        )?;
5199        __struct.turn_rate = buf.get_i8();
5200        let tmp = buf.get_u8();
5201        __struct.navigational_status =
5202            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5203                enum_type: "AisNavStatus",
5204                value: tmp as u32,
5205            })?;
5206        let tmp = buf.get_u8();
5207        __struct.mavtype =
5208            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5209                enum_type: "AisType",
5210                value: tmp as u32,
5211            })?;
5212        __struct.dimension_port = buf.get_u8();
5213        __struct.dimension_starboard = buf.get_u8();
5214        for v in &mut __struct.callsign {
5215            let val = buf.get_u8();
5216            *v = val;
5217        }
5218        for v in &mut __struct.name {
5219            let val = buf.get_u8();
5220            *v = val;
5221        }
5222        Ok(__struct)
5223    }
5224    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5225        let mut __tmp = BytesMut::new(bytes);
5226        #[allow(clippy::absurd_extreme_comparisons)]
5227        #[allow(unused_comparisons)]
5228        if __tmp.remaining() < Self::ENCODED_LEN {
5229            panic!(
5230                "buffer is too small (need {} bytes, but got {})",
5231                Self::ENCODED_LEN,
5232                __tmp.remaining(),
5233            )
5234        }
5235        __tmp.put_u32_le(self.MMSI);
5236        __tmp.put_i32_le(self.lat);
5237        __tmp.put_i32_le(self.lon);
5238        __tmp.put_u16_le(self.COG);
5239        __tmp.put_u16_le(self.heading);
5240        __tmp.put_u16_le(self.velocity);
5241        __tmp.put_u16_le(self.dimension_bow);
5242        __tmp.put_u16_le(self.dimension_stern);
5243        __tmp.put_u16_le(self.tslc);
5244        __tmp.put_u16_le(self.flags.bits());
5245        __tmp.put_i8(self.turn_rate);
5246        __tmp.put_u8(self.navigational_status as u8);
5247        __tmp.put_u8(self.mavtype as u8);
5248        __tmp.put_u8(self.dimension_port);
5249        __tmp.put_u8(self.dimension_starboard);
5250        for val in &self.callsign {
5251            __tmp.put_u8(*val);
5252        }
5253        for val in &self.name {
5254            __tmp.put_u8(*val);
5255        }
5256        if matches!(version, MavlinkVersion::V2) {
5257            let len = __tmp.len();
5258            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5259        } else {
5260            __tmp.len()
5261        }
5262    }
5263}
5264#[doc = "The current system altitude."]
5265#[doc = ""]
5266#[doc = "ID: 141"]
5267#[derive(Debug, Clone, PartialEq)]
5268#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5269#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5270#[cfg_attr(feature = "ts", derive(TS))]
5271#[cfg_attr(feature = "ts", ts(export))]
5272pub struct ALTITUDE_DATA {
5273    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5274    pub time_usec: u64,
5275    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5276    pub altitude_monotonic: f32,
5277    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5278    pub altitude_amsl: f32,
5279    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5280    pub altitude_local: f32,
5281    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5282    pub altitude_relative: f32,
5283    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5284    pub altitude_terrain: f32,
5285    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5286    pub bottom_clearance: f32,
5287}
5288impl ALTITUDE_DATA {
5289    pub const ENCODED_LEN: usize = 32usize;
5290    pub const DEFAULT: Self = Self {
5291        time_usec: 0_u64,
5292        altitude_monotonic: 0.0_f32,
5293        altitude_amsl: 0.0_f32,
5294        altitude_local: 0.0_f32,
5295        altitude_relative: 0.0_f32,
5296        altitude_terrain: 0.0_f32,
5297        bottom_clearance: 0.0_f32,
5298    };
5299    #[cfg(feature = "arbitrary")]
5300    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5301        use arbitrary::{Arbitrary, Unstructured};
5302        let mut buf = [0u8; 1024];
5303        rng.fill_bytes(&mut buf);
5304        let mut unstructured = Unstructured::new(&buf);
5305        Self::arbitrary(&mut unstructured).unwrap_or_default()
5306    }
5307}
5308impl Default for ALTITUDE_DATA {
5309    fn default() -> Self {
5310        Self::DEFAULT.clone()
5311    }
5312}
5313impl MessageData for ALTITUDE_DATA {
5314    type Message = MavMessage;
5315    const ID: u32 = 141u32;
5316    const NAME: &'static str = "ALTITUDE";
5317    const EXTRA_CRC: u8 = 47u8;
5318    const ENCODED_LEN: usize = 32usize;
5319    fn deser(
5320        _version: MavlinkVersion,
5321        __input: &[u8],
5322    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5323        let avail_len = __input.len();
5324        let mut payload_buf = [0; Self::ENCODED_LEN];
5325        let mut buf = if avail_len < Self::ENCODED_LEN {
5326            payload_buf[0..avail_len].copy_from_slice(__input);
5327            Bytes::new(&payload_buf)
5328        } else {
5329            Bytes::new(__input)
5330        };
5331        let mut __struct = Self::default();
5332        __struct.time_usec = buf.get_u64_le();
5333        __struct.altitude_monotonic = buf.get_f32_le();
5334        __struct.altitude_amsl = buf.get_f32_le();
5335        __struct.altitude_local = buf.get_f32_le();
5336        __struct.altitude_relative = buf.get_f32_le();
5337        __struct.altitude_terrain = buf.get_f32_le();
5338        __struct.bottom_clearance = buf.get_f32_le();
5339        Ok(__struct)
5340    }
5341    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5342        let mut __tmp = BytesMut::new(bytes);
5343        #[allow(clippy::absurd_extreme_comparisons)]
5344        #[allow(unused_comparisons)]
5345        if __tmp.remaining() < Self::ENCODED_LEN {
5346            panic!(
5347                "buffer is too small (need {} bytes, but got {})",
5348                Self::ENCODED_LEN,
5349                __tmp.remaining(),
5350            )
5351        }
5352        __tmp.put_u64_le(self.time_usec);
5353        __tmp.put_f32_le(self.altitude_monotonic);
5354        __tmp.put_f32_le(self.altitude_amsl);
5355        __tmp.put_f32_le(self.altitude_local);
5356        __tmp.put_f32_le(self.altitude_relative);
5357        __tmp.put_f32_le(self.altitude_terrain);
5358        __tmp.put_f32_le(self.bottom_clearance);
5359        if matches!(version, MavlinkVersion::V2) {
5360            let len = __tmp.len();
5361            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5362        } else {
5363            __tmp.len()
5364        }
5365    }
5366}
5367#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5368#[doc = ""]
5369#[doc = "ID: 30"]
5370#[derive(Debug, Clone, PartialEq)]
5371#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5372#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5373#[cfg_attr(feature = "ts", derive(TS))]
5374#[cfg_attr(feature = "ts", ts(export))]
5375pub struct ATTITUDE_DATA {
5376    #[doc = "Timestamp (time since system boot)."]
5377    pub time_boot_ms: u32,
5378    #[doc = "Roll angle (-pi..+pi)"]
5379    pub roll: f32,
5380    #[doc = "Pitch angle (-pi..+pi)"]
5381    pub pitch: f32,
5382    #[doc = "Yaw angle (-pi..+pi)"]
5383    pub yaw: f32,
5384    #[doc = "Roll angular speed"]
5385    pub rollspeed: f32,
5386    #[doc = "Pitch angular speed"]
5387    pub pitchspeed: f32,
5388    #[doc = "Yaw angular speed"]
5389    pub yawspeed: f32,
5390}
5391impl ATTITUDE_DATA {
5392    pub const ENCODED_LEN: usize = 28usize;
5393    pub const DEFAULT: Self = Self {
5394        time_boot_ms: 0_u32,
5395        roll: 0.0_f32,
5396        pitch: 0.0_f32,
5397        yaw: 0.0_f32,
5398        rollspeed: 0.0_f32,
5399        pitchspeed: 0.0_f32,
5400        yawspeed: 0.0_f32,
5401    };
5402    #[cfg(feature = "arbitrary")]
5403    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5404        use arbitrary::{Arbitrary, Unstructured};
5405        let mut buf = [0u8; 1024];
5406        rng.fill_bytes(&mut buf);
5407        let mut unstructured = Unstructured::new(&buf);
5408        Self::arbitrary(&mut unstructured).unwrap_or_default()
5409    }
5410}
5411impl Default for ATTITUDE_DATA {
5412    fn default() -> Self {
5413        Self::DEFAULT.clone()
5414    }
5415}
5416impl MessageData for ATTITUDE_DATA {
5417    type Message = MavMessage;
5418    const ID: u32 = 30u32;
5419    const NAME: &'static str = "ATTITUDE";
5420    const EXTRA_CRC: u8 = 39u8;
5421    const ENCODED_LEN: usize = 28usize;
5422    fn deser(
5423        _version: MavlinkVersion,
5424        __input: &[u8],
5425    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5426        let avail_len = __input.len();
5427        let mut payload_buf = [0; Self::ENCODED_LEN];
5428        let mut buf = if avail_len < Self::ENCODED_LEN {
5429            payload_buf[0..avail_len].copy_from_slice(__input);
5430            Bytes::new(&payload_buf)
5431        } else {
5432            Bytes::new(__input)
5433        };
5434        let mut __struct = Self::default();
5435        __struct.time_boot_ms = buf.get_u32_le();
5436        __struct.roll = buf.get_f32_le();
5437        __struct.pitch = buf.get_f32_le();
5438        __struct.yaw = buf.get_f32_le();
5439        __struct.rollspeed = buf.get_f32_le();
5440        __struct.pitchspeed = buf.get_f32_le();
5441        __struct.yawspeed = buf.get_f32_le();
5442        Ok(__struct)
5443    }
5444    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5445        let mut __tmp = BytesMut::new(bytes);
5446        #[allow(clippy::absurd_extreme_comparisons)]
5447        #[allow(unused_comparisons)]
5448        if __tmp.remaining() < Self::ENCODED_LEN {
5449            panic!(
5450                "buffer is too small (need {} bytes, but got {})",
5451                Self::ENCODED_LEN,
5452                __tmp.remaining(),
5453            )
5454        }
5455        __tmp.put_u32_le(self.time_boot_ms);
5456        __tmp.put_f32_le(self.roll);
5457        __tmp.put_f32_le(self.pitch);
5458        __tmp.put_f32_le(self.yaw);
5459        __tmp.put_f32_le(self.rollspeed);
5460        __tmp.put_f32_le(self.pitchspeed);
5461        __tmp.put_f32_le(self.yawspeed);
5462        if matches!(version, MavlinkVersion::V2) {
5463            let len = __tmp.len();
5464            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5465        } else {
5466            __tmp.len()
5467        }
5468    }
5469}
5470#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5471#[doc = ""]
5472#[doc = "ID: 31"]
5473#[derive(Debug, Clone, PartialEq)]
5474#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5476#[cfg_attr(feature = "ts", derive(TS))]
5477#[cfg_attr(feature = "ts", ts(export))]
5478pub struct ATTITUDE_QUATERNION_DATA {
5479    #[doc = "Timestamp (time since system boot)."]
5480    pub time_boot_ms: u32,
5481    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5482    pub q1: f32,
5483    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5484    pub q2: f32,
5485    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5486    pub q3: f32,
5487    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5488    pub q4: f32,
5489    #[doc = "Roll angular speed"]
5490    pub rollspeed: f32,
5491    #[doc = "Pitch angular speed"]
5492    pub pitchspeed: f32,
5493    #[doc = "Yaw angular speed"]
5494    pub yawspeed: f32,
5495    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5496    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5497    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5498    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5499    pub repr_offset_q: [f32; 4],
5500}
5501impl ATTITUDE_QUATERNION_DATA {
5502    pub const ENCODED_LEN: usize = 48usize;
5503    pub const DEFAULT: Self = Self {
5504        time_boot_ms: 0_u32,
5505        q1: 0.0_f32,
5506        q2: 0.0_f32,
5507        q3: 0.0_f32,
5508        q4: 0.0_f32,
5509        rollspeed: 0.0_f32,
5510        pitchspeed: 0.0_f32,
5511        yawspeed: 0.0_f32,
5512        repr_offset_q: [0.0_f32; 4usize],
5513    };
5514    #[cfg(feature = "arbitrary")]
5515    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5516        use arbitrary::{Arbitrary, Unstructured};
5517        let mut buf = [0u8; 1024];
5518        rng.fill_bytes(&mut buf);
5519        let mut unstructured = Unstructured::new(&buf);
5520        Self::arbitrary(&mut unstructured).unwrap_or_default()
5521    }
5522}
5523impl Default for ATTITUDE_QUATERNION_DATA {
5524    fn default() -> Self {
5525        Self::DEFAULT.clone()
5526    }
5527}
5528impl MessageData for ATTITUDE_QUATERNION_DATA {
5529    type Message = MavMessage;
5530    const ID: u32 = 31u32;
5531    const NAME: &'static str = "ATTITUDE_QUATERNION";
5532    const EXTRA_CRC: u8 = 246u8;
5533    const ENCODED_LEN: usize = 48usize;
5534    fn deser(
5535        _version: MavlinkVersion,
5536        __input: &[u8],
5537    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5538        let avail_len = __input.len();
5539        let mut payload_buf = [0; Self::ENCODED_LEN];
5540        let mut buf = if avail_len < Self::ENCODED_LEN {
5541            payload_buf[0..avail_len].copy_from_slice(__input);
5542            Bytes::new(&payload_buf)
5543        } else {
5544            Bytes::new(__input)
5545        };
5546        let mut __struct = Self::default();
5547        __struct.time_boot_ms = buf.get_u32_le();
5548        __struct.q1 = buf.get_f32_le();
5549        __struct.q2 = buf.get_f32_le();
5550        __struct.q3 = buf.get_f32_le();
5551        __struct.q4 = buf.get_f32_le();
5552        __struct.rollspeed = buf.get_f32_le();
5553        __struct.pitchspeed = buf.get_f32_le();
5554        __struct.yawspeed = buf.get_f32_le();
5555        for v in &mut __struct.repr_offset_q {
5556            let val = buf.get_f32_le();
5557            *v = val;
5558        }
5559        Ok(__struct)
5560    }
5561    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5562        let mut __tmp = BytesMut::new(bytes);
5563        #[allow(clippy::absurd_extreme_comparisons)]
5564        #[allow(unused_comparisons)]
5565        if __tmp.remaining() < Self::ENCODED_LEN {
5566            panic!(
5567                "buffer is too small (need {} bytes, but got {})",
5568                Self::ENCODED_LEN,
5569                __tmp.remaining(),
5570            )
5571        }
5572        __tmp.put_u32_le(self.time_boot_ms);
5573        __tmp.put_f32_le(self.q1);
5574        __tmp.put_f32_le(self.q2);
5575        __tmp.put_f32_le(self.q3);
5576        __tmp.put_f32_le(self.q4);
5577        __tmp.put_f32_le(self.rollspeed);
5578        __tmp.put_f32_le(self.pitchspeed);
5579        __tmp.put_f32_le(self.yawspeed);
5580        if matches!(version, MavlinkVersion::V2) {
5581            for val in &self.repr_offset_q {
5582                __tmp.put_f32_le(*val);
5583            }
5584            let len = __tmp.len();
5585            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5586        } else {
5587            __tmp.len()
5588        }
5589    }
5590}
5591#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5592#[doc = ""]
5593#[doc = "ID: 61"]
5594#[derive(Debug, Clone, PartialEq)]
5595#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5596#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5597#[cfg_attr(feature = "ts", derive(TS))]
5598#[cfg_attr(feature = "ts", ts(export))]
5599pub struct ATTITUDE_QUATERNION_COV_DATA {
5600    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5601    pub time_usec: u64,
5602    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5603    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5604    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5605    pub q: [f32; 4],
5606    #[doc = "Roll angular speed"]
5607    pub rollspeed: f32,
5608    #[doc = "Pitch angular speed"]
5609    pub pitchspeed: f32,
5610    #[doc = "Yaw angular speed"]
5611    pub yawspeed: f32,
5612    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5613    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5614    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5615    pub covariance: [f32; 9],
5616}
5617impl ATTITUDE_QUATERNION_COV_DATA {
5618    pub const ENCODED_LEN: usize = 72usize;
5619    pub const DEFAULT: Self = Self {
5620        time_usec: 0_u64,
5621        q: [0.0_f32; 4usize],
5622        rollspeed: 0.0_f32,
5623        pitchspeed: 0.0_f32,
5624        yawspeed: 0.0_f32,
5625        covariance: [0.0_f32; 9usize],
5626    };
5627    #[cfg(feature = "arbitrary")]
5628    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5629        use arbitrary::{Arbitrary, Unstructured};
5630        let mut buf = [0u8; 1024];
5631        rng.fill_bytes(&mut buf);
5632        let mut unstructured = Unstructured::new(&buf);
5633        Self::arbitrary(&mut unstructured).unwrap_or_default()
5634    }
5635}
5636impl Default for ATTITUDE_QUATERNION_COV_DATA {
5637    fn default() -> Self {
5638        Self::DEFAULT.clone()
5639    }
5640}
5641impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5642    type Message = MavMessage;
5643    const ID: u32 = 61u32;
5644    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5645    const EXTRA_CRC: u8 = 167u8;
5646    const ENCODED_LEN: usize = 72usize;
5647    fn deser(
5648        _version: MavlinkVersion,
5649        __input: &[u8],
5650    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5651        let avail_len = __input.len();
5652        let mut payload_buf = [0; Self::ENCODED_LEN];
5653        let mut buf = if avail_len < Self::ENCODED_LEN {
5654            payload_buf[0..avail_len].copy_from_slice(__input);
5655            Bytes::new(&payload_buf)
5656        } else {
5657            Bytes::new(__input)
5658        };
5659        let mut __struct = Self::default();
5660        __struct.time_usec = buf.get_u64_le();
5661        for v in &mut __struct.q {
5662            let val = buf.get_f32_le();
5663            *v = val;
5664        }
5665        __struct.rollspeed = buf.get_f32_le();
5666        __struct.pitchspeed = buf.get_f32_le();
5667        __struct.yawspeed = buf.get_f32_le();
5668        for v in &mut __struct.covariance {
5669            let val = buf.get_f32_le();
5670            *v = val;
5671        }
5672        Ok(__struct)
5673    }
5674    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5675        let mut __tmp = BytesMut::new(bytes);
5676        #[allow(clippy::absurd_extreme_comparisons)]
5677        #[allow(unused_comparisons)]
5678        if __tmp.remaining() < Self::ENCODED_LEN {
5679            panic!(
5680                "buffer is too small (need {} bytes, but got {})",
5681                Self::ENCODED_LEN,
5682                __tmp.remaining(),
5683            )
5684        }
5685        __tmp.put_u64_le(self.time_usec);
5686        for val in &self.q {
5687            __tmp.put_f32_le(*val);
5688        }
5689        __tmp.put_f32_le(self.rollspeed);
5690        __tmp.put_f32_le(self.pitchspeed);
5691        __tmp.put_f32_le(self.yawspeed);
5692        for val in &self.covariance {
5693            __tmp.put_f32_le(*val);
5694        }
5695        if matches!(version, MavlinkVersion::V2) {
5696            let len = __tmp.len();
5697            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5698        } else {
5699            __tmp.len()
5700        }
5701    }
5702}
5703#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5704#[doc = ""]
5705#[doc = "ID: 83"]
5706#[derive(Debug, Clone, PartialEq)]
5707#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5708#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5709#[cfg_attr(feature = "ts", derive(TS))]
5710#[cfg_attr(feature = "ts", ts(export))]
5711pub struct ATTITUDE_TARGET_DATA {
5712    #[doc = "Timestamp (time since system boot)."]
5713    pub time_boot_ms: u32,
5714    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5715    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5716    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5717    pub q: [f32; 4],
5718    #[doc = "Body roll rate"]
5719    pub body_roll_rate: f32,
5720    #[doc = "Body pitch rate"]
5721    pub body_pitch_rate: f32,
5722    #[doc = "Body yaw rate"]
5723    pub body_yaw_rate: f32,
5724    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5725    pub thrust: f32,
5726    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5727    pub type_mask: AttitudeTargetTypemask,
5728}
5729impl ATTITUDE_TARGET_DATA {
5730    pub const ENCODED_LEN: usize = 37usize;
5731    pub const DEFAULT: Self = Self {
5732        time_boot_ms: 0_u32,
5733        q: [0.0_f32; 4usize],
5734        body_roll_rate: 0.0_f32,
5735        body_pitch_rate: 0.0_f32,
5736        body_yaw_rate: 0.0_f32,
5737        thrust: 0.0_f32,
5738        type_mask: AttitudeTargetTypemask::DEFAULT,
5739    };
5740    #[cfg(feature = "arbitrary")]
5741    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5742        use arbitrary::{Arbitrary, Unstructured};
5743        let mut buf = [0u8; 1024];
5744        rng.fill_bytes(&mut buf);
5745        let mut unstructured = Unstructured::new(&buf);
5746        Self::arbitrary(&mut unstructured).unwrap_or_default()
5747    }
5748}
5749impl Default for ATTITUDE_TARGET_DATA {
5750    fn default() -> Self {
5751        Self::DEFAULT.clone()
5752    }
5753}
5754impl MessageData for ATTITUDE_TARGET_DATA {
5755    type Message = MavMessage;
5756    const ID: u32 = 83u32;
5757    const NAME: &'static str = "ATTITUDE_TARGET";
5758    const EXTRA_CRC: u8 = 22u8;
5759    const ENCODED_LEN: usize = 37usize;
5760    fn deser(
5761        _version: MavlinkVersion,
5762        __input: &[u8],
5763    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5764        let avail_len = __input.len();
5765        let mut payload_buf = [0; Self::ENCODED_LEN];
5766        let mut buf = if avail_len < Self::ENCODED_LEN {
5767            payload_buf[0..avail_len].copy_from_slice(__input);
5768            Bytes::new(&payload_buf)
5769        } else {
5770            Bytes::new(__input)
5771        };
5772        let mut __struct = Self::default();
5773        __struct.time_boot_ms = buf.get_u32_le();
5774        for v in &mut __struct.q {
5775            let val = buf.get_f32_le();
5776            *v = val;
5777        }
5778        __struct.body_roll_rate = buf.get_f32_le();
5779        __struct.body_pitch_rate = buf.get_f32_le();
5780        __struct.body_yaw_rate = buf.get_f32_le();
5781        __struct.thrust = buf.get_f32_le();
5782        let tmp = buf.get_u8();
5783        __struct.type_mask = AttitudeTargetTypemask::from_bits(
5784            tmp & AttitudeTargetTypemask::all().bits(),
5785        )
5786        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5787            flag_type: "AttitudeTargetTypemask",
5788            value: tmp as u32,
5789        })?;
5790        Ok(__struct)
5791    }
5792    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5793        let mut __tmp = BytesMut::new(bytes);
5794        #[allow(clippy::absurd_extreme_comparisons)]
5795        #[allow(unused_comparisons)]
5796        if __tmp.remaining() < Self::ENCODED_LEN {
5797            panic!(
5798                "buffer is too small (need {} bytes, but got {})",
5799                Self::ENCODED_LEN,
5800                __tmp.remaining(),
5801            )
5802        }
5803        __tmp.put_u32_le(self.time_boot_ms);
5804        for val in &self.q {
5805            __tmp.put_f32_le(*val);
5806        }
5807        __tmp.put_f32_le(self.body_roll_rate);
5808        __tmp.put_f32_le(self.body_pitch_rate);
5809        __tmp.put_f32_le(self.body_yaw_rate);
5810        __tmp.put_f32_le(self.thrust);
5811        __tmp.put_u8(self.type_mask.bits());
5812        if matches!(version, MavlinkVersion::V2) {
5813            let len = __tmp.len();
5814            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5815        } else {
5816            __tmp.len()
5817        }
5818    }
5819}
5820#[doc = "Motion capture attitude and position."]
5821#[doc = ""]
5822#[doc = "ID: 138"]
5823#[derive(Debug, Clone, PartialEq)]
5824#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5825#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5826#[cfg_attr(feature = "ts", derive(TS))]
5827#[cfg_attr(feature = "ts", ts(export))]
5828pub struct ATT_POS_MOCAP_DATA {
5829    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5830    pub time_usec: u64,
5831    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5832    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5833    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5834    pub q: [f32; 4],
5835    #[doc = "X position (NED)"]
5836    pub x: f32,
5837    #[doc = "Y position (NED)"]
5838    pub y: f32,
5839    #[doc = "Z position (NED)"]
5840    pub z: f32,
5841    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
5842    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5843    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5844    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5845    pub covariance: [f32; 21],
5846}
5847impl ATT_POS_MOCAP_DATA {
5848    pub const ENCODED_LEN: usize = 120usize;
5849    pub const DEFAULT: Self = Self {
5850        time_usec: 0_u64,
5851        q: [0.0_f32; 4usize],
5852        x: 0.0_f32,
5853        y: 0.0_f32,
5854        z: 0.0_f32,
5855        covariance: [0.0_f32; 21usize],
5856    };
5857    #[cfg(feature = "arbitrary")]
5858    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5859        use arbitrary::{Arbitrary, Unstructured};
5860        let mut buf = [0u8; 1024];
5861        rng.fill_bytes(&mut buf);
5862        let mut unstructured = Unstructured::new(&buf);
5863        Self::arbitrary(&mut unstructured).unwrap_or_default()
5864    }
5865}
5866impl Default for ATT_POS_MOCAP_DATA {
5867    fn default() -> Self {
5868        Self::DEFAULT.clone()
5869    }
5870}
5871impl MessageData for ATT_POS_MOCAP_DATA {
5872    type Message = MavMessage;
5873    const ID: u32 = 138u32;
5874    const NAME: &'static str = "ATT_POS_MOCAP";
5875    const EXTRA_CRC: u8 = 109u8;
5876    const ENCODED_LEN: usize = 120usize;
5877    fn deser(
5878        _version: MavlinkVersion,
5879        __input: &[u8],
5880    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5881        let avail_len = __input.len();
5882        let mut payload_buf = [0; Self::ENCODED_LEN];
5883        let mut buf = if avail_len < Self::ENCODED_LEN {
5884            payload_buf[0..avail_len].copy_from_slice(__input);
5885            Bytes::new(&payload_buf)
5886        } else {
5887            Bytes::new(__input)
5888        };
5889        let mut __struct = Self::default();
5890        __struct.time_usec = buf.get_u64_le();
5891        for v in &mut __struct.q {
5892            let val = buf.get_f32_le();
5893            *v = val;
5894        }
5895        __struct.x = buf.get_f32_le();
5896        __struct.y = buf.get_f32_le();
5897        __struct.z = buf.get_f32_le();
5898        for v in &mut __struct.covariance {
5899            let val = buf.get_f32_le();
5900            *v = val;
5901        }
5902        Ok(__struct)
5903    }
5904    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5905        let mut __tmp = BytesMut::new(bytes);
5906        #[allow(clippy::absurd_extreme_comparisons)]
5907        #[allow(unused_comparisons)]
5908        if __tmp.remaining() < Self::ENCODED_LEN {
5909            panic!(
5910                "buffer is too small (need {} bytes, but got {})",
5911                Self::ENCODED_LEN,
5912                __tmp.remaining(),
5913            )
5914        }
5915        __tmp.put_u64_le(self.time_usec);
5916        for val in &self.q {
5917            __tmp.put_f32_le(*val);
5918        }
5919        __tmp.put_f32_le(self.x);
5920        __tmp.put_f32_le(self.y);
5921        __tmp.put_f32_le(self.z);
5922        if matches!(version, MavlinkVersion::V2) {
5923            for val in &self.covariance {
5924                __tmp.put_f32_le(*val);
5925            }
5926            let len = __tmp.len();
5927            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5928        } else {
5929            __tmp.len()
5930        }
5931    }
5932}
5933#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
5934#[doc = ""]
5935#[doc = "ID: 7"]
5936#[derive(Debug, Clone, PartialEq)]
5937#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5938#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5939#[cfg_attr(feature = "ts", derive(TS))]
5940#[cfg_attr(feature = "ts", ts(export))]
5941pub struct AUTH_KEY_DATA {
5942    #[doc = "key"]
5943    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5944    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5945    pub key: [u8; 32],
5946}
5947impl AUTH_KEY_DATA {
5948    pub const ENCODED_LEN: usize = 32usize;
5949    pub const DEFAULT: Self = Self {
5950        key: [0_u8; 32usize],
5951    };
5952    #[cfg(feature = "arbitrary")]
5953    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5954        use arbitrary::{Arbitrary, Unstructured};
5955        let mut buf = [0u8; 1024];
5956        rng.fill_bytes(&mut buf);
5957        let mut unstructured = Unstructured::new(&buf);
5958        Self::arbitrary(&mut unstructured).unwrap_or_default()
5959    }
5960}
5961impl Default for AUTH_KEY_DATA {
5962    fn default() -> Self {
5963        Self::DEFAULT.clone()
5964    }
5965}
5966impl MessageData for AUTH_KEY_DATA {
5967    type Message = MavMessage;
5968    const ID: u32 = 7u32;
5969    const NAME: &'static str = "AUTH_KEY";
5970    const EXTRA_CRC: u8 = 119u8;
5971    const ENCODED_LEN: usize = 32usize;
5972    fn deser(
5973        _version: MavlinkVersion,
5974        __input: &[u8],
5975    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5976        let avail_len = __input.len();
5977        let mut payload_buf = [0; Self::ENCODED_LEN];
5978        let mut buf = if avail_len < Self::ENCODED_LEN {
5979            payload_buf[0..avail_len].copy_from_slice(__input);
5980            Bytes::new(&payload_buf)
5981        } else {
5982            Bytes::new(__input)
5983        };
5984        let mut __struct = Self::default();
5985        for v in &mut __struct.key {
5986            let val = buf.get_u8();
5987            *v = val;
5988        }
5989        Ok(__struct)
5990    }
5991    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5992        let mut __tmp = BytesMut::new(bytes);
5993        #[allow(clippy::absurd_extreme_comparisons)]
5994        #[allow(unused_comparisons)]
5995        if __tmp.remaining() < Self::ENCODED_LEN {
5996            panic!(
5997                "buffer is too small (need {} bytes, but got {})",
5998                Self::ENCODED_LEN,
5999                __tmp.remaining(),
6000            )
6001        }
6002        for val in &self.key {
6003            __tmp.put_u8(*val);
6004        }
6005        if matches!(version, MavlinkVersion::V2) {
6006            let len = __tmp.len();
6007            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6008        } else {
6009            __tmp.len()
6010        }
6011    }
6012}
6013#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
6014#[doc = ""]
6015#[doc = "ID: 286"]
6016#[derive(Debug, Clone, PartialEq)]
6017#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6018#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6019#[cfg_attr(feature = "ts", derive(TS))]
6020#[cfg_attr(feature = "ts", ts(export))]
6021pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6022    #[doc = "Timestamp (time since system boot)."]
6023    pub time_boot_us: u64,
6024    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
6025    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6026    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6027    pub q: [f32; 4],
6028    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
6029    pub q_estimated_delay_us: u32,
6030    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
6031    pub vx: f32,
6032    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
6033    pub vy: f32,
6034    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
6035    pub vz: f32,
6036    #[doc = "Estimated delay of the speed data. 0 if unknown."]
6037    pub v_estimated_delay_us: u32,
6038    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
6039    pub feed_forward_angular_velocity_z: f32,
6040    #[doc = "Bitmap indicating which estimator outputs are valid."]
6041    pub estimator_status: EstimatorStatusFlags,
6042    #[doc = "System ID"]
6043    pub target_system: u8,
6044    #[doc = "Component ID"]
6045    pub target_component: u8,
6046    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
6047    pub landed_state: MavLandedState,
6048    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
6049    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6050    pub angular_velocity_z: f32,
6051}
6052impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6053    pub const ENCODED_LEN: usize = 57usize;
6054    pub const DEFAULT: Self = Self {
6055        time_boot_us: 0_u64,
6056        q: [0.0_f32; 4usize],
6057        q_estimated_delay_us: 0_u32,
6058        vx: 0.0_f32,
6059        vy: 0.0_f32,
6060        vz: 0.0_f32,
6061        v_estimated_delay_us: 0_u32,
6062        feed_forward_angular_velocity_z: 0.0_f32,
6063        estimator_status: EstimatorStatusFlags::DEFAULT,
6064        target_system: 0_u8,
6065        target_component: 0_u8,
6066        landed_state: MavLandedState::DEFAULT,
6067        angular_velocity_z: 0.0_f32,
6068    };
6069    #[cfg(feature = "arbitrary")]
6070    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6071        use arbitrary::{Arbitrary, Unstructured};
6072        let mut buf = [0u8; 1024];
6073        rng.fill_bytes(&mut buf);
6074        let mut unstructured = Unstructured::new(&buf);
6075        Self::arbitrary(&mut unstructured).unwrap_or_default()
6076    }
6077}
6078impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6079    fn default() -> Self {
6080        Self::DEFAULT.clone()
6081    }
6082}
6083impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6084    type Message = MavMessage;
6085    const ID: u32 = 286u32;
6086    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6087    const EXTRA_CRC: u8 = 210u8;
6088    const ENCODED_LEN: usize = 57usize;
6089    fn deser(
6090        _version: MavlinkVersion,
6091        __input: &[u8],
6092    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6093        let avail_len = __input.len();
6094        let mut payload_buf = [0; Self::ENCODED_LEN];
6095        let mut buf = if avail_len < Self::ENCODED_LEN {
6096            payload_buf[0..avail_len].copy_from_slice(__input);
6097            Bytes::new(&payload_buf)
6098        } else {
6099            Bytes::new(__input)
6100        };
6101        let mut __struct = Self::default();
6102        __struct.time_boot_us = buf.get_u64_le();
6103        for v in &mut __struct.q {
6104            let val = buf.get_f32_le();
6105            *v = val;
6106        }
6107        __struct.q_estimated_delay_us = buf.get_u32_le();
6108        __struct.vx = buf.get_f32_le();
6109        __struct.vy = buf.get_f32_le();
6110        __struct.vz = buf.get_f32_le();
6111        __struct.v_estimated_delay_us = buf.get_u32_le();
6112        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
6113        let tmp = buf.get_u16_le();
6114        __struct.estimator_status = EstimatorStatusFlags::from_bits(
6115            tmp & EstimatorStatusFlags::all().bits(),
6116        )
6117        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6118            flag_type: "EstimatorStatusFlags",
6119            value: tmp as u32,
6120        })?;
6121        __struct.target_system = buf.get_u8();
6122        __struct.target_component = buf.get_u8();
6123        let tmp = buf.get_u8();
6124        __struct.landed_state =
6125            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6126                enum_type: "MavLandedState",
6127                value: tmp as u32,
6128            })?;
6129        __struct.angular_velocity_z = buf.get_f32_le();
6130        Ok(__struct)
6131    }
6132    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6133        let mut __tmp = BytesMut::new(bytes);
6134        #[allow(clippy::absurd_extreme_comparisons)]
6135        #[allow(unused_comparisons)]
6136        if __tmp.remaining() < Self::ENCODED_LEN {
6137            panic!(
6138                "buffer is too small (need {} bytes, but got {})",
6139                Self::ENCODED_LEN,
6140                __tmp.remaining(),
6141            )
6142        }
6143        __tmp.put_u64_le(self.time_boot_us);
6144        for val in &self.q {
6145            __tmp.put_f32_le(*val);
6146        }
6147        __tmp.put_u32_le(self.q_estimated_delay_us);
6148        __tmp.put_f32_le(self.vx);
6149        __tmp.put_f32_le(self.vy);
6150        __tmp.put_f32_le(self.vz);
6151        __tmp.put_u32_le(self.v_estimated_delay_us);
6152        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6153        __tmp.put_u16_le(self.estimator_status.bits());
6154        __tmp.put_u8(self.target_system);
6155        __tmp.put_u8(self.target_component);
6156        __tmp.put_u8(self.landed_state as u8);
6157        if matches!(version, MavlinkVersion::V2) {
6158            __tmp.put_f32_le(self.angular_velocity_z);
6159            let len = __tmp.len();
6160            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6161        } else {
6162            __tmp.len()
6163        }
6164    }
6165}
6166#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6167#[doc = ""]
6168#[doc = "ID: 148"]
6169#[derive(Debug, Clone, PartialEq)]
6170#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6171#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6172#[cfg_attr(feature = "ts", derive(TS))]
6173#[cfg_attr(feature = "ts", ts(export))]
6174pub struct AUTOPILOT_VERSION_DATA {
6175    #[doc = "Bitmap of capabilities"]
6176    pub capabilities: MavProtocolCapability,
6177    #[doc = "UID if provided by hardware (see uid2)"]
6178    pub uid: u64,
6179    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6180    pub flight_sw_version: u32,
6181    #[doc = "Middleware version number"]
6182    pub middleware_sw_version: u32,
6183    #[doc = "Operating system version number"]
6184    pub os_sw_version: u32,
6185    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6186    pub board_version: u32,
6187    #[doc = "ID of the board vendor"]
6188    pub vendor_id: u16,
6189    #[doc = "ID of the product"]
6190    pub product_id: u16,
6191    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6192    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6193    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6194    pub flight_custom_version: [u8; 8],
6195    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6196    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6197    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6198    pub middleware_custom_version: [u8; 8],
6199    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6200    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6201    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6202    pub os_custom_version: [u8; 8],
6203    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6204    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6205    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6206    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6207    pub uid2: [u8; 18],
6208}
6209impl AUTOPILOT_VERSION_DATA {
6210    pub const ENCODED_LEN: usize = 78usize;
6211    pub const DEFAULT: Self = Self {
6212        capabilities: MavProtocolCapability::DEFAULT,
6213        uid: 0_u64,
6214        flight_sw_version: 0_u32,
6215        middleware_sw_version: 0_u32,
6216        os_sw_version: 0_u32,
6217        board_version: 0_u32,
6218        vendor_id: 0_u16,
6219        product_id: 0_u16,
6220        flight_custom_version: [0_u8; 8usize],
6221        middleware_custom_version: [0_u8; 8usize],
6222        os_custom_version: [0_u8; 8usize],
6223        uid2: [0_u8; 18usize],
6224    };
6225    #[cfg(feature = "arbitrary")]
6226    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6227        use arbitrary::{Arbitrary, Unstructured};
6228        let mut buf = [0u8; 1024];
6229        rng.fill_bytes(&mut buf);
6230        let mut unstructured = Unstructured::new(&buf);
6231        Self::arbitrary(&mut unstructured).unwrap_or_default()
6232    }
6233}
6234impl Default for AUTOPILOT_VERSION_DATA {
6235    fn default() -> Self {
6236        Self::DEFAULT.clone()
6237    }
6238}
6239impl MessageData for AUTOPILOT_VERSION_DATA {
6240    type Message = MavMessage;
6241    const ID: u32 = 148u32;
6242    const NAME: &'static str = "AUTOPILOT_VERSION";
6243    const EXTRA_CRC: u8 = 178u8;
6244    const ENCODED_LEN: usize = 78usize;
6245    fn deser(
6246        _version: MavlinkVersion,
6247        __input: &[u8],
6248    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6249        let avail_len = __input.len();
6250        let mut payload_buf = [0; Self::ENCODED_LEN];
6251        let mut buf = if avail_len < Self::ENCODED_LEN {
6252            payload_buf[0..avail_len].copy_from_slice(__input);
6253            Bytes::new(&payload_buf)
6254        } else {
6255            Bytes::new(__input)
6256        };
6257        let mut __struct = Self::default();
6258        let tmp = buf.get_u64_le();
6259        __struct.capabilities = MavProtocolCapability::from_bits(
6260            tmp & MavProtocolCapability::all().bits(),
6261        )
6262        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6263            flag_type: "MavProtocolCapability",
6264            value: tmp as u32,
6265        })?;
6266        __struct.uid = buf.get_u64_le();
6267        __struct.flight_sw_version = buf.get_u32_le();
6268        __struct.middleware_sw_version = buf.get_u32_le();
6269        __struct.os_sw_version = buf.get_u32_le();
6270        __struct.board_version = buf.get_u32_le();
6271        __struct.vendor_id = buf.get_u16_le();
6272        __struct.product_id = buf.get_u16_le();
6273        for v in &mut __struct.flight_custom_version {
6274            let val = buf.get_u8();
6275            *v = val;
6276        }
6277        for v in &mut __struct.middleware_custom_version {
6278            let val = buf.get_u8();
6279            *v = val;
6280        }
6281        for v in &mut __struct.os_custom_version {
6282            let val = buf.get_u8();
6283            *v = val;
6284        }
6285        for v in &mut __struct.uid2 {
6286            let val = buf.get_u8();
6287            *v = val;
6288        }
6289        Ok(__struct)
6290    }
6291    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6292        let mut __tmp = BytesMut::new(bytes);
6293        #[allow(clippy::absurd_extreme_comparisons)]
6294        #[allow(unused_comparisons)]
6295        if __tmp.remaining() < Self::ENCODED_LEN {
6296            panic!(
6297                "buffer is too small (need {} bytes, but got {})",
6298                Self::ENCODED_LEN,
6299                __tmp.remaining(),
6300            )
6301        }
6302        __tmp.put_u64_le(self.capabilities.bits());
6303        __tmp.put_u64_le(self.uid);
6304        __tmp.put_u32_le(self.flight_sw_version);
6305        __tmp.put_u32_le(self.middleware_sw_version);
6306        __tmp.put_u32_le(self.os_sw_version);
6307        __tmp.put_u32_le(self.board_version);
6308        __tmp.put_u16_le(self.vendor_id);
6309        __tmp.put_u16_le(self.product_id);
6310        for val in &self.flight_custom_version {
6311            __tmp.put_u8(*val);
6312        }
6313        for val in &self.middleware_custom_version {
6314            __tmp.put_u8(*val);
6315        }
6316        for val in &self.os_custom_version {
6317            __tmp.put_u8(*val);
6318        }
6319        if matches!(version, MavlinkVersion::V2) {
6320            for val in &self.uid2 {
6321                __tmp.put_u8(*val);
6322            }
6323            let len = __tmp.len();
6324            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6325        } else {
6326            __tmp.len()
6327        }
6328    }
6329}
6330#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6331#[doc = ""]
6332#[doc = "ID: 435"]
6333#[derive(Debug, Clone, PartialEq)]
6334#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6335#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6336#[cfg_attr(feature = "ts", derive(TS))]
6337#[cfg_attr(feature = "ts", ts(export))]
6338pub struct AVAILABLE_MODES_DATA {
6339    #[doc = "A bitfield for use for autopilot-specific flags"]
6340    pub custom_mode: u32,
6341    #[doc = "Mode properties."]
6342    pub properties: MavModeProperty,
6343    #[doc = "The total number of available modes for the current vehicle type."]
6344    pub number_modes: u8,
6345    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6346    pub mode_index: u8,
6347    #[doc = "Standard mode."]
6348    pub standard_mode: MavStandardMode,
6349    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6350    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6351    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6352    pub mode_name: [u8; 35],
6353}
6354impl AVAILABLE_MODES_DATA {
6355    pub const ENCODED_LEN: usize = 46usize;
6356    pub const DEFAULT: Self = Self {
6357        custom_mode: 0_u32,
6358        properties: MavModeProperty::DEFAULT,
6359        number_modes: 0_u8,
6360        mode_index: 0_u8,
6361        standard_mode: MavStandardMode::DEFAULT,
6362        mode_name: [0_u8; 35usize],
6363    };
6364    #[cfg(feature = "arbitrary")]
6365    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6366        use arbitrary::{Arbitrary, Unstructured};
6367        let mut buf = [0u8; 1024];
6368        rng.fill_bytes(&mut buf);
6369        let mut unstructured = Unstructured::new(&buf);
6370        Self::arbitrary(&mut unstructured).unwrap_or_default()
6371    }
6372}
6373impl Default for AVAILABLE_MODES_DATA {
6374    fn default() -> Self {
6375        Self::DEFAULT.clone()
6376    }
6377}
6378impl MessageData for AVAILABLE_MODES_DATA {
6379    type Message = MavMessage;
6380    const ID: u32 = 435u32;
6381    const NAME: &'static str = "AVAILABLE_MODES";
6382    const EXTRA_CRC: u8 = 134u8;
6383    const ENCODED_LEN: usize = 46usize;
6384    fn deser(
6385        _version: MavlinkVersion,
6386        __input: &[u8],
6387    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6388        let avail_len = __input.len();
6389        let mut payload_buf = [0; Self::ENCODED_LEN];
6390        let mut buf = if avail_len < Self::ENCODED_LEN {
6391            payload_buf[0..avail_len].copy_from_slice(__input);
6392            Bytes::new(&payload_buf)
6393        } else {
6394            Bytes::new(__input)
6395        };
6396        let mut __struct = Self::default();
6397        __struct.custom_mode = buf.get_u32_le();
6398        let tmp = buf.get_u32_le();
6399        __struct.properties = MavModeProperty::from_bits(tmp & MavModeProperty::all().bits())
6400            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6401                flag_type: "MavModeProperty",
6402                value: tmp as u32,
6403            })?;
6404        __struct.number_modes = buf.get_u8();
6405        __struct.mode_index = buf.get_u8();
6406        let tmp = buf.get_u8();
6407        __struct.standard_mode =
6408            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6409                enum_type: "MavStandardMode",
6410                value: tmp as u32,
6411            })?;
6412        for v in &mut __struct.mode_name {
6413            let val = buf.get_u8();
6414            *v = val;
6415        }
6416        Ok(__struct)
6417    }
6418    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6419        let mut __tmp = BytesMut::new(bytes);
6420        #[allow(clippy::absurd_extreme_comparisons)]
6421        #[allow(unused_comparisons)]
6422        if __tmp.remaining() < Self::ENCODED_LEN {
6423            panic!(
6424                "buffer is too small (need {} bytes, but got {})",
6425                Self::ENCODED_LEN,
6426                __tmp.remaining(),
6427            )
6428        }
6429        __tmp.put_u32_le(self.custom_mode);
6430        __tmp.put_u32_le(self.properties.bits());
6431        __tmp.put_u8(self.number_modes);
6432        __tmp.put_u8(self.mode_index);
6433        __tmp.put_u8(self.standard_mode as u8);
6434        for val in &self.mode_name {
6435            __tmp.put_u8(*val);
6436        }
6437        if matches!(version, MavlinkVersion::V2) {
6438            let len = __tmp.len();
6439            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6440        } else {
6441            __tmp.len()
6442        }
6443    }
6444}
6445#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6446#[doc = ""]
6447#[doc = "ID: 437"]
6448#[derive(Debug, Clone, PartialEq)]
6449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6450#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6451#[cfg_attr(feature = "ts", derive(TS))]
6452#[cfg_attr(feature = "ts", ts(export))]
6453pub struct AVAILABLE_MODES_MONITOR_DATA {
6454    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6455    pub seq: u8,
6456}
6457impl AVAILABLE_MODES_MONITOR_DATA {
6458    pub const ENCODED_LEN: usize = 1usize;
6459    pub const DEFAULT: Self = Self { seq: 0_u8 };
6460    #[cfg(feature = "arbitrary")]
6461    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6462        use arbitrary::{Arbitrary, Unstructured};
6463        let mut buf = [0u8; 1024];
6464        rng.fill_bytes(&mut buf);
6465        let mut unstructured = Unstructured::new(&buf);
6466        Self::arbitrary(&mut unstructured).unwrap_or_default()
6467    }
6468}
6469impl Default for AVAILABLE_MODES_MONITOR_DATA {
6470    fn default() -> Self {
6471        Self::DEFAULT.clone()
6472    }
6473}
6474impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6475    type Message = MavMessage;
6476    const ID: u32 = 437u32;
6477    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6478    const EXTRA_CRC: u8 = 30u8;
6479    const ENCODED_LEN: usize = 1usize;
6480    fn deser(
6481        _version: MavlinkVersion,
6482        __input: &[u8],
6483    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6484        let avail_len = __input.len();
6485        let mut payload_buf = [0; Self::ENCODED_LEN];
6486        let mut buf = if avail_len < Self::ENCODED_LEN {
6487            payload_buf[0..avail_len].copy_from_slice(__input);
6488            Bytes::new(&payload_buf)
6489        } else {
6490            Bytes::new(__input)
6491        };
6492        let mut __struct = Self::default();
6493        __struct.seq = buf.get_u8();
6494        Ok(__struct)
6495    }
6496    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6497        let mut __tmp = BytesMut::new(bytes);
6498        #[allow(clippy::absurd_extreme_comparisons)]
6499        #[allow(unused_comparisons)]
6500        if __tmp.remaining() < Self::ENCODED_LEN {
6501            panic!(
6502                "buffer is too small (need {} bytes, but got {})",
6503                Self::ENCODED_LEN,
6504                __tmp.remaining(),
6505            )
6506        }
6507        __tmp.put_u8(self.seq);
6508        if matches!(version, MavlinkVersion::V2) {
6509            let len = __tmp.len();
6510            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6511        } else {
6512            __tmp.len()
6513        }
6514    }
6515}
6516#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6517#[doc = ""]
6518#[doc = "ID: 372"]
6519#[derive(Debug, Clone, PartialEq)]
6520#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6521#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6522#[cfg_attr(feature = "ts", derive(TS))]
6523#[cfg_attr(feature = "ts", ts(export))]
6524pub struct BATTERY_INFO_DATA {
6525    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6526    pub discharge_minimum_voltage: f32,
6527    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6528    pub charging_minimum_voltage: f32,
6529    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6530    pub resting_minimum_voltage: f32,
6531    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6532    pub charging_maximum_voltage: f32,
6533    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6534    pub charging_maximum_current: f32,
6535    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6536    pub nominal_voltage: f32,
6537    #[doc = "Maximum pack discharge current. 0: field not provided."]
6538    pub discharge_maximum_current: f32,
6539    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6540    pub discharge_maximum_burst_current: f32,
6541    #[doc = "Fully charged design capacity. 0: field not provided."]
6542    pub design_capacity: f32,
6543    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6544    pub full_charge_capacity: f32,
6545    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6546    pub cycle_count: u16,
6547    #[doc = "Battery weight. 0: field not provided."]
6548    pub weight: u16,
6549    #[doc = "Battery ID"]
6550    pub id: u8,
6551    #[doc = "Function of the battery."]
6552    pub battery_function: MavBatteryFunction,
6553    #[doc = "Type (chemistry) of the battery."]
6554    pub mavtype: MavBatteryType,
6555    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6556    pub state_of_health: u8,
6557    #[doc = "Number of battery cells in series. 0: field not provided."]
6558    pub cells_in_series: u8,
6559    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6560    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6561    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6562    pub manufacture_date: [u8; 9],
6563    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6564    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6565    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6566    pub serial_number: [u8; 32],
6567    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
6568    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6569    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6570    pub name: [u8; 50],
6571}
6572impl BATTERY_INFO_DATA {
6573    pub const ENCODED_LEN: usize = 140usize;
6574    pub const DEFAULT: Self = Self {
6575        discharge_minimum_voltage: 0.0_f32,
6576        charging_minimum_voltage: 0.0_f32,
6577        resting_minimum_voltage: 0.0_f32,
6578        charging_maximum_voltage: 0.0_f32,
6579        charging_maximum_current: 0.0_f32,
6580        nominal_voltage: 0.0_f32,
6581        discharge_maximum_current: 0.0_f32,
6582        discharge_maximum_burst_current: 0.0_f32,
6583        design_capacity: 0.0_f32,
6584        full_charge_capacity: 0.0_f32,
6585        cycle_count: 0_u16,
6586        weight: 0_u16,
6587        id: 0_u8,
6588        battery_function: MavBatteryFunction::DEFAULT,
6589        mavtype: MavBatteryType::DEFAULT,
6590        state_of_health: 0_u8,
6591        cells_in_series: 0_u8,
6592        manufacture_date: [0_u8; 9usize],
6593        serial_number: [0_u8; 32usize],
6594        name: [0_u8; 50usize],
6595    };
6596    #[cfg(feature = "arbitrary")]
6597    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6598        use arbitrary::{Arbitrary, Unstructured};
6599        let mut buf = [0u8; 1024];
6600        rng.fill_bytes(&mut buf);
6601        let mut unstructured = Unstructured::new(&buf);
6602        Self::arbitrary(&mut unstructured).unwrap_or_default()
6603    }
6604}
6605impl Default for BATTERY_INFO_DATA {
6606    fn default() -> Self {
6607        Self::DEFAULT.clone()
6608    }
6609}
6610impl MessageData for BATTERY_INFO_DATA {
6611    type Message = MavMessage;
6612    const ID: u32 = 372u32;
6613    const NAME: &'static str = "BATTERY_INFO";
6614    const EXTRA_CRC: u8 = 26u8;
6615    const ENCODED_LEN: usize = 140usize;
6616    fn deser(
6617        _version: MavlinkVersion,
6618        __input: &[u8],
6619    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6620        let avail_len = __input.len();
6621        let mut payload_buf = [0; Self::ENCODED_LEN];
6622        let mut buf = if avail_len < Self::ENCODED_LEN {
6623            payload_buf[0..avail_len].copy_from_slice(__input);
6624            Bytes::new(&payload_buf)
6625        } else {
6626            Bytes::new(__input)
6627        };
6628        let mut __struct = Self::default();
6629        __struct.discharge_minimum_voltage = buf.get_f32_le();
6630        __struct.charging_minimum_voltage = buf.get_f32_le();
6631        __struct.resting_minimum_voltage = buf.get_f32_le();
6632        __struct.charging_maximum_voltage = buf.get_f32_le();
6633        __struct.charging_maximum_current = buf.get_f32_le();
6634        __struct.nominal_voltage = buf.get_f32_le();
6635        __struct.discharge_maximum_current = buf.get_f32_le();
6636        __struct.discharge_maximum_burst_current = buf.get_f32_le();
6637        __struct.design_capacity = buf.get_f32_le();
6638        __struct.full_charge_capacity = buf.get_f32_le();
6639        __struct.cycle_count = buf.get_u16_le();
6640        __struct.weight = buf.get_u16_le();
6641        __struct.id = buf.get_u8();
6642        let tmp = buf.get_u8();
6643        __struct.battery_function =
6644            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6645                enum_type: "MavBatteryFunction",
6646                value: tmp as u32,
6647            })?;
6648        let tmp = buf.get_u8();
6649        __struct.mavtype =
6650            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6651                enum_type: "MavBatteryType",
6652                value: tmp as u32,
6653            })?;
6654        __struct.state_of_health = buf.get_u8();
6655        __struct.cells_in_series = buf.get_u8();
6656        for v in &mut __struct.manufacture_date {
6657            let val = buf.get_u8();
6658            *v = val;
6659        }
6660        for v in &mut __struct.serial_number {
6661            let val = buf.get_u8();
6662            *v = val;
6663        }
6664        for v in &mut __struct.name {
6665            let val = buf.get_u8();
6666            *v = val;
6667        }
6668        Ok(__struct)
6669    }
6670    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6671        let mut __tmp = BytesMut::new(bytes);
6672        #[allow(clippy::absurd_extreme_comparisons)]
6673        #[allow(unused_comparisons)]
6674        if __tmp.remaining() < Self::ENCODED_LEN {
6675            panic!(
6676                "buffer is too small (need {} bytes, but got {})",
6677                Self::ENCODED_LEN,
6678                __tmp.remaining(),
6679            )
6680        }
6681        __tmp.put_f32_le(self.discharge_minimum_voltage);
6682        __tmp.put_f32_le(self.charging_minimum_voltage);
6683        __tmp.put_f32_le(self.resting_minimum_voltage);
6684        __tmp.put_f32_le(self.charging_maximum_voltage);
6685        __tmp.put_f32_le(self.charging_maximum_current);
6686        __tmp.put_f32_le(self.nominal_voltage);
6687        __tmp.put_f32_le(self.discharge_maximum_current);
6688        __tmp.put_f32_le(self.discharge_maximum_burst_current);
6689        __tmp.put_f32_le(self.design_capacity);
6690        __tmp.put_f32_le(self.full_charge_capacity);
6691        __tmp.put_u16_le(self.cycle_count);
6692        __tmp.put_u16_le(self.weight);
6693        __tmp.put_u8(self.id);
6694        __tmp.put_u8(self.battery_function as u8);
6695        __tmp.put_u8(self.mavtype as u8);
6696        __tmp.put_u8(self.state_of_health);
6697        __tmp.put_u8(self.cells_in_series);
6698        for val in &self.manufacture_date {
6699            __tmp.put_u8(*val);
6700        }
6701        for val in &self.serial_number {
6702            __tmp.put_u8(*val);
6703        }
6704        for val in &self.name {
6705            __tmp.put_u8(*val);
6706        }
6707        if matches!(version, MavlinkVersion::V2) {
6708            let len = __tmp.len();
6709            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6710        } else {
6711            __tmp.len()
6712        }
6713    }
6714}
6715#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
6716#[doc = ""]
6717#[doc = "ID: 147"]
6718#[derive(Debug, Clone, PartialEq)]
6719#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6720#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6721#[cfg_attr(feature = "ts", derive(TS))]
6722#[cfg_attr(feature = "ts", ts(export))]
6723pub struct BATTERY_STATUS_DATA {
6724    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
6725    pub current_consumed: i32,
6726    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
6727    pub energy_consumed: i32,
6728    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
6729    pub temperature: i16,
6730    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
6731    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6732    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6733    pub voltages: [u16; 10],
6734    #[doc = "Battery current, -1: autopilot does not measure the current"]
6735    pub current_battery: i16,
6736    #[doc = "Battery ID"]
6737    pub id: u8,
6738    #[doc = "Function of the battery"]
6739    pub battery_function: MavBatteryFunction,
6740    #[doc = "Type (chemistry) of the battery"]
6741    pub mavtype: MavBatteryType,
6742    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
6743    pub battery_remaining: i8,
6744    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
6745    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6746    pub time_remaining: i32,
6747    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
6748    #[cfg_attr(feature = "serde", serde(default))]
6749    pub charge_state: MavBatteryChargeState,
6750    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
6751    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6752    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6753    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6754    pub voltages_ext: [u16; 4],
6755    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
6756    #[cfg_attr(feature = "serde", serde(default))]
6757    pub mode: MavBatteryMode,
6758    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
6759    #[cfg_attr(feature = "serde", serde(default))]
6760    pub fault_bitmask: MavBatteryFault,
6761}
6762impl BATTERY_STATUS_DATA {
6763    pub const ENCODED_LEN: usize = 54usize;
6764    pub const DEFAULT: Self = Self {
6765        current_consumed: 0_i32,
6766        energy_consumed: 0_i32,
6767        temperature: 0_i16,
6768        voltages: [0_u16; 10usize],
6769        current_battery: 0_i16,
6770        id: 0_u8,
6771        battery_function: MavBatteryFunction::DEFAULT,
6772        mavtype: MavBatteryType::DEFAULT,
6773        battery_remaining: 0_i8,
6774        time_remaining: 0_i32,
6775        charge_state: MavBatteryChargeState::DEFAULT,
6776        voltages_ext: [0_u16; 4usize],
6777        mode: MavBatteryMode::DEFAULT,
6778        fault_bitmask: MavBatteryFault::DEFAULT,
6779    };
6780    #[cfg(feature = "arbitrary")]
6781    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6782        use arbitrary::{Arbitrary, Unstructured};
6783        let mut buf = [0u8; 1024];
6784        rng.fill_bytes(&mut buf);
6785        let mut unstructured = Unstructured::new(&buf);
6786        Self::arbitrary(&mut unstructured).unwrap_or_default()
6787    }
6788}
6789impl Default for BATTERY_STATUS_DATA {
6790    fn default() -> Self {
6791        Self::DEFAULT.clone()
6792    }
6793}
6794impl MessageData for BATTERY_STATUS_DATA {
6795    type Message = MavMessage;
6796    const ID: u32 = 147u32;
6797    const NAME: &'static str = "BATTERY_STATUS";
6798    const EXTRA_CRC: u8 = 154u8;
6799    const ENCODED_LEN: usize = 54usize;
6800    fn deser(
6801        _version: MavlinkVersion,
6802        __input: &[u8],
6803    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6804        let avail_len = __input.len();
6805        let mut payload_buf = [0; Self::ENCODED_LEN];
6806        let mut buf = if avail_len < Self::ENCODED_LEN {
6807            payload_buf[0..avail_len].copy_from_slice(__input);
6808            Bytes::new(&payload_buf)
6809        } else {
6810            Bytes::new(__input)
6811        };
6812        let mut __struct = Self::default();
6813        __struct.current_consumed = buf.get_i32_le();
6814        __struct.energy_consumed = buf.get_i32_le();
6815        __struct.temperature = buf.get_i16_le();
6816        for v in &mut __struct.voltages {
6817            let val = buf.get_u16_le();
6818            *v = val;
6819        }
6820        __struct.current_battery = buf.get_i16_le();
6821        __struct.id = buf.get_u8();
6822        let tmp = buf.get_u8();
6823        __struct.battery_function =
6824            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6825                enum_type: "MavBatteryFunction",
6826                value: tmp as u32,
6827            })?;
6828        let tmp = buf.get_u8();
6829        __struct.mavtype =
6830            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6831                enum_type: "MavBatteryType",
6832                value: tmp as u32,
6833            })?;
6834        __struct.battery_remaining = buf.get_i8();
6835        __struct.time_remaining = buf.get_i32_le();
6836        let tmp = buf.get_u8();
6837        __struct.charge_state =
6838            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6839                enum_type: "MavBatteryChargeState",
6840                value: tmp as u32,
6841            })?;
6842        for v in &mut __struct.voltages_ext {
6843            let val = buf.get_u16_le();
6844            *v = val;
6845        }
6846        let tmp = buf.get_u8();
6847        __struct.mode =
6848            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6849                enum_type: "MavBatteryMode",
6850                value: tmp as u32,
6851            })?;
6852        let tmp = buf.get_u32_le();
6853        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp & MavBatteryFault::all().bits())
6854            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6855                flag_type: "MavBatteryFault",
6856                value: tmp as u32,
6857            })?;
6858        Ok(__struct)
6859    }
6860    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6861        let mut __tmp = BytesMut::new(bytes);
6862        #[allow(clippy::absurd_extreme_comparisons)]
6863        #[allow(unused_comparisons)]
6864        if __tmp.remaining() < Self::ENCODED_LEN {
6865            panic!(
6866                "buffer is too small (need {} bytes, but got {})",
6867                Self::ENCODED_LEN,
6868                __tmp.remaining(),
6869            )
6870        }
6871        __tmp.put_i32_le(self.current_consumed);
6872        __tmp.put_i32_le(self.energy_consumed);
6873        __tmp.put_i16_le(self.temperature);
6874        for val in &self.voltages {
6875            __tmp.put_u16_le(*val);
6876        }
6877        __tmp.put_i16_le(self.current_battery);
6878        __tmp.put_u8(self.id);
6879        __tmp.put_u8(self.battery_function as u8);
6880        __tmp.put_u8(self.mavtype as u8);
6881        __tmp.put_i8(self.battery_remaining);
6882        if matches!(version, MavlinkVersion::V2) {
6883            __tmp.put_i32_le(self.time_remaining);
6884            __tmp.put_u8(self.charge_state as u8);
6885            for val in &self.voltages_ext {
6886                __tmp.put_u16_le(*val);
6887            }
6888            __tmp.put_u8(self.mode as u8);
6889            __tmp.put_u32_le(self.fault_bitmask.bits());
6890            let len = __tmp.len();
6891            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6892        } else {
6893            __tmp.len()
6894        }
6895    }
6896}
6897#[doc = "Report button state change."]
6898#[doc = ""]
6899#[doc = "ID: 257"]
6900#[derive(Debug, Clone, PartialEq)]
6901#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6902#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6903#[cfg_attr(feature = "ts", derive(TS))]
6904#[cfg_attr(feature = "ts", ts(export))]
6905pub struct BUTTON_CHANGE_DATA {
6906    #[doc = "Timestamp (time since system boot)."]
6907    pub time_boot_ms: u32,
6908    #[doc = "Time of last change of button state."]
6909    pub last_change_ms: u32,
6910    #[doc = "Bitmap for state of buttons."]
6911    pub state: u8,
6912}
6913impl BUTTON_CHANGE_DATA {
6914    pub const ENCODED_LEN: usize = 9usize;
6915    pub const DEFAULT: Self = Self {
6916        time_boot_ms: 0_u32,
6917        last_change_ms: 0_u32,
6918        state: 0_u8,
6919    };
6920    #[cfg(feature = "arbitrary")]
6921    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6922        use arbitrary::{Arbitrary, Unstructured};
6923        let mut buf = [0u8; 1024];
6924        rng.fill_bytes(&mut buf);
6925        let mut unstructured = Unstructured::new(&buf);
6926        Self::arbitrary(&mut unstructured).unwrap_or_default()
6927    }
6928}
6929impl Default for BUTTON_CHANGE_DATA {
6930    fn default() -> Self {
6931        Self::DEFAULT.clone()
6932    }
6933}
6934impl MessageData for BUTTON_CHANGE_DATA {
6935    type Message = MavMessage;
6936    const ID: u32 = 257u32;
6937    const NAME: &'static str = "BUTTON_CHANGE";
6938    const EXTRA_CRC: u8 = 131u8;
6939    const ENCODED_LEN: usize = 9usize;
6940    fn deser(
6941        _version: MavlinkVersion,
6942        __input: &[u8],
6943    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6944        let avail_len = __input.len();
6945        let mut payload_buf = [0; Self::ENCODED_LEN];
6946        let mut buf = if avail_len < Self::ENCODED_LEN {
6947            payload_buf[0..avail_len].copy_from_slice(__input);
6948            Bytes::new(&payload_buf)
6949        } else {
6950            Bytes::new(__input)
6951        };
6952        let mut __struct = Self::default();
6953        __struct.time_boot_ms = buf.get_u32_le();
6954        __struct.last_change_ms = buf.get_u32_le();
6955        __struct.state = buf.get_u8();
6956        Ok(__struct)
6957    }
6958    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6959        let mut __tmp = BytesMut::new(bytes);
6960        #[allow(clippy::absurd_extreme_comparisons)]
6961        #[allow(unused_comparisons)]
6962        if __tmp.remaining() < Self::ENCODED_LEN {
6963            panic!(
6964                "buffer is too small (need {} bytes, but got {})",
6965                Self::ENCODED_LEN,
6966                __tmp.remaining(),
6967            )
6968        }
6969        __tmp.put_u32_le(self.time_boot_ms);
6970        __tmp.put_u32_le(self.last_change_ms);
6971        __tmp.put_u8(self.state);
6972        if matches!(version, MavlinkVersion::V2) {
6973            let len = __tmp.len();
6974            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6975        } else {
6976            __tmp.len()
6977        }
6978    }
6979}
6980#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
6981#[doc = ""]
6982#[doc = "ID: 262"]
6983#[derive(Debug, Clone, PartialEq)]
6984#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6985#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6986#[cfg_attr(feature = "ts", derive(TS))]
6987#[cfg_attr(feature = "ts", ts(export))]
6988pub struct CAMERA_CAPTURE_STATUS_DATA {
6989    #[doc = "Timestamp (time since system boot)."]
6990    pub time_boot_ms: u32,
6991    #[doc = "Image capture interval"]
6992    pub image_interval: f32,
6993    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
6994    pub recording_time_ms: u32,
6995    #[doc = "Available storage capacity."]
6996    pub available_capacity: f32,
6997    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
6998    pub image_status: u8,
6999    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
7000    pub video_status: u8,
7001    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
7002    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7003    pub image_count: i32,
7004    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7005    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7006    pub camera_device_id: u8,
7007}
7008impl CAMERA_CAPTURE_STATUS_DATA {
7009    pub const ENCODED_LEN: usize = 23usize;
7010    pub const DEFAULT: Self = Self {
7011        time_boot_ms: 0_u32,
7012        image_interval: 0.0_f32,
7013        recording_time_ms: 0_u32,
7014        available_capacity: 0.0_f32,
7015        image_status: 0_u8,
7016        video_status: 0_u8,
7017        image_count: 0_i32,
7018        camera_device_id: 0_u8,
7019    };
7020    #[cfg(feature = "arbitrary")]
7021    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7022        use arbitrary::{Arbitrary, Unstructured};
7023        let mut buf = [0u8; 1024];
7024        rng.fill_bytes(&mut buf);
7025        let mut unstructured = Unstructured::new(&buf);
7026        Self::arbitrary(&mut unstructured).unwrap_or_default()
7027    }
7028}
7029impl Default for CAMERA_CAPTURE_STATUS_DATA {
7030    fn default() -> Self {
7031        Self::DEFAULT.clone()
7032    }
7033}
7034impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
7035    type Message = MavMessage;
7036    const ID: u32 = 262u32;
7037    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
7038    const EXTRA_CRC: u8 = 12u8;
7039    const ENCODED_LEN: usize = 23usize;
7040    fn deser(
7041        _version: MavlinkVersion,
7042        __input: &[u8],
7043    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7044        let avail_len = __input.len();
7045        let mut payload_buf = [0; Self::ENCODED_LEN];
7046        let mut buf = if avail_len < Self::ENCODED_LEN {
7047            payload_buf[0..avail_len].copy_from_slice(__input);
7048            Bytes::new(&payload_buf)
7049        } else {
7050            Bytes::new(__input)
7051        };
7052        let mut __struct = Self::default();
7053        __struct.time_boot_ms = buf.get_u32_le();
7054        __struct.image_interval = buf.get_f32_le();
7055        __struct.recording_time_ms = buf.get_u32_le();
7056        __struct.available_capacity = buf.get_f32_le();
7057        __struct.image_status = buf.get_u8();
7058        __struct.video_status = buf.get_u8();
7059        __struct.image_count = buf.get_i32_le();
7060        __struct.camera_device_id = buf.get_u8();
7061        Ok(__struct)
7062    }
7063    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7064        let mut __tmp = BytesMut::new(bytes);
7065        #[allow(clippy::absurd_extreme_comparisons)]
7066        #[allow(unused_comparisons)]
7067        if __tmp.remaining() < Self::ENCODED_LEN {
7068            panic!(
7069                "buffer is too small (need {} bytes, but got {})",
7070                Self::ENCODED_LEN,
7071                __tmp.remaining(),
7072            )
7073        }
7074        __tmp.put_u32_le(self.time_boot_ms);
7075        __tmp.put_f32_le(self.image_interval);
7076        __tmp.put_u32_le(self.recording_time_ms);
7077        __tmp.put_f32_le(self.available_capacity);
7078        __tmp.put_u8(self.image_status);
7079        __tmp.put_u8(self.video_status);
7080        if matches!(version, MavlinkVersion::V2) {
7081            __tmp.put_i32_le(self.image_count);
7082            __tmp.put_u8(self.camera_device_id);
7083            let len = __tmp.len();
7084            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7085        } else {
7086            __tmp.len()
7087        }
7088    }
7089}
7090#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7091#[doc = ""]
7092#[doc = "ID: 271"]
7093#[derive(Debug, Clone, PartialEq)]
7094#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7095#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7096#[cfg_attr(feature = "ts", derive(TS))]
7097#[cfg_attr(feature = "ts", ts(export))]
7098pub struct CAMERA_FOV_STATUS_DATA {
7099    #[doc = "Timestamp (time since system boot)."]
7100    pub time_boot_ms: u32,
7101    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7102    pub lat_camera: i32,
7103    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7104    pub lon_camera: i32,
7105    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7106    pub alt_camera: i32,
7107    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7108    pub lat_image: i32,
7109    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7110    pub lon_image: i32,
7111    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7112    pub alt_image: i32,
7113    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7114    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7115    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7116    pub q: [f32; 4],
7117    #[doc = "Horizontal field of view (NaN if unknown)."]
7118    pub hfov: f32,
7119    #[doc = "Vertical field of view (NaN if unknown)."]
7120    pub vfov: f32,
7121    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7122    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7123    pub camera_device_id: u8,
7124}
7125impl CAMERA_FOV_STATUS_DATA {
7126    pub const ENCODED_LEN: usize = 53usize;
7127    pub const DEFAULT: Self = Self {
7128        time_boot_ms: 0_u32,
7129        lat_camera: 0_i32,
7130        lon_camera: 0_i32,
7131        alt_camera: 0_i32,
7132        lat_image: 0_i32,
7133        lon_image: 0_i32,
7134        alt_image: 0_i32,
7135        q: [0.0_f32; 4usize],
7136        hfov: 0.0_f32,
7137        vfov: 0.0_f32,
7138        camera_device_id: 0_u8,
7139    };
7140    #[cfg(feature = "arbitrary")]
7141    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7142        use arbitrary::{Arbitrary, Unstructured};
7143        let mut buf = [0u8; 1024];
7144        rng.fill_bytes(&mut buf);
7145        let mut unstructured = Unstructured::new(&buf);
7146        Self::arbitrary(&mut unstructured).unwrap_or_default()
7147    }
7148}
7149impl Default for CAMERA_FOV_STATUS_DATA {
7150    fn default() -> Self {
7151        Self::DEFAULT.clone()
7152    }
7153}
7154impl MessageData for CAMERA_FOV_STATUS_DATA {
7155    type Message = MavMessage;
7156    const ID: u32 = 271u32;
7157    const NAME: &'static str = "CAMERA_FOV_STATUS";
7158    const EXTRA_CRC: u8 = 22u8;
7159    const ENCODED_LEN: usize = 53usize;
7160    fn deser(
7161        _version: MavlinkVersion,
7162        __input: &[u8],
7163    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7164        let avail_len = __input.len();
7165        let mut payload_buf = [0; Self::ENCODED_LEN];
7166        let mut buf = if avail_len < Self::ENCODED_LEN {
7167            payload_buf[0..avail_len].copy_from_slice(__input);
7168            Bytes::new(&payload_buf)
7169        } else {
7170            Bytes::new(__input)
7171        };
7172        let mut __struct = Self::default();
7173        __struct.time_boot_ms = buf.get_u32_le();
7174        __struct.lat_camera = buf.get_i32_le();
7175        __struct.lon_camera = buf.get_i32_le();
7176        __struct.alt_camera = buf.get_i32_le();
7177        __struct.lat_image = buf.get_i32_le();
7178        __struct.lon_image = buf.get_i32_le();
7179        __struct.alt_image = buf.get_i32_le();
7180        for v in &mut __struct.q {
7181            let val = buf.get_f32_le();
7182            *v = val;
7183        }
7184        __struct.hfov = buf.get_f32_le();
7185        __struct.vfov = buf.get_f32_le();
7186        __struct.camera_device_id = buf.get_u8();
7187        Ok(__struct)
7188    }
7189    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7190        let mut __tmp = BytesMut::new(bytes);
7191        #[allow(clippy::absurd_extreme_comparisons)]
7192        #[allow(unused_comparisons)]
7193        if __tmp.remaining() < Self::ENCODED_LEN {
7194            panic!(
7195                "buffer is too small (need {} bytes, but got {})",
7196                Self::ENCODED_LEN,
7197                __tmp.remaining(),
7198            )
7199        }
7200        __tmp.put_u32_le(self.time_boot_ms);
7201        __tmp.put_i32_le(self.lat_camera);
7202        __tmp.put_i32_le(self.lon_camera);
7203        __tmp.put_i32_le(self.alt_camera);
7204        __tmp.put_i32_le(self.lat_image);
7205        __tmp.put_i32_le(self.lon_image);
7206        __tmp.put_i32_le(self.alt_image);
7207        for val in &self.q {
7208            __tmp.put_f32_le(*val);
7209        }
7210        __tmp.put_f32_le(self.hfov);
7211        __tmp.put_f32_le(self.vfov);
7212        if matches!(version, MavlinkVersion::V2) {
7213            __tmp.put_u8(self.camera_device_id);
7214            let len = __tmp.len();
7215            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7216        } else {
7217            __tmp.len()
7218        }
7219    }
7220}
7221#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7222#[doc = ""]
7223#[doc = "ID: 263"]
7224#[derive(Debug, Clone, PartialEq)]
7225#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7226#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7227#[cfg_attr(feature = "ts", derive(TS))]
7228#[cfg_attr(feature = "ts", ts(export))]
7229pub struct CAMERA_IMAGE_CAPTURED_DATA {
7230    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7231    pub time_utc: u64,
7232    #[doc = "Timestamp (time since system boot)."]
7233    pub time_boot_ms: u32,
7234    #[doc = "Latitude where image was taken"]
7235    pub lat: i32,
7236    #[doc = "Longitude where capture was taken"]
7237    pub lon: i32,
7238    #[doc = "Altitude (MSL) where image was taken"]
7239    pub alt: i32,
7240    #[doc = "Altitude above ground"]
7241    pub relative_alt: i32,
7242    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7243    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7244    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7245    pub q: [f32; 4],
7246    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7247    pub image_index: i32,
7248    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7249    pub camera_id: u8,
7250    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7251    pub capture_result: i8,
7252    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7253    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7254    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7255    pub file_url: [u8; 205],
7256}
7257impl CAMERA_IMAGE_CAPTURED_DATA {
7258    pub const ENCODED_LEN: usize = 255usize;
7259    pub const DEFAULT: Self = Self {
7260        time_utc: 0_u64,
7261        time_boot_ms: 0_u32,
7262        lat: 0_i32,
7263        lon: 0_i32,
7264        alt: 0_i32,
7265        relative_alt: 0_i32,
7266        q: [0.0_f32; 4usize],
7267        image_index: 0_i32,
7268        camera_id: 0_u8,
7269        capture_result: 0_i8,
7270        file_url: [0_u8; 205usize],
7271    };
7272    #[cfg(feature = "arbitrary")]
7273    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7274        use arbitrary::{Arbitrary, Unstructured};
7275        let mut buf = [0u8; 1024];
7276        rng.fill_bytes(&mut buf);
7277        let mut unstructured = Unstructured::new(&buf);
7278        Self::arbitrary(&mut unstructured).unwrap_or_default()
7279    }
7280}
7281impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7282    fn default() -> Self {
7283        Self::DEFAULT.clone()
7284    }
7285}
7286impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7287    type Message = MavMessage;
7288    const ID: u32 = 263u32;
7289    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7290    const EXTRA_CRC: u8 = 133u8;
7291    const ENCODED_LEN: usize = 255usize;
7292    fn deser(
7293        _version: MavlinkVersion,
7294        __input: &[u8],
7295    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7296        let avail_len = __input.len();
7297        let mut payload_buf = [0; Self::ENCODED_LEN];
7298        let mut buf = if avail_len < Self::ENCODED_LEN {
7299            payload_buf[0..avail_len].copy_from_slice(__input);
7300            Bytes::new(&payload_buf)
7301        } else {
7302            Bytes::new(__input)
7303        };
7304        let mut __struct = Self::default();
7305        __struct.time_utc = buf.get_u64_le();
7306        __struct.time_boot_ms = buf.get_u32_le();
7307        __struct.lat = buf.get_i32_le();
7308        __struct.lon = buf.get_i32_le();
7309        __struct.alt = buf.get_i32_le();
7310        __struct.relative_alt = buf.get_i32_le();
7311        for v in &mut __struct.q {
7312            let val = buf.get_f32_le();
7313            *v = val;
7314        }
7315        __struct.image_index = buf.get_i32_le();
7316        __struct.camera_id = buf.get_u8();
7317        __struct.capture_result = buf.get_i8();
7318        for v in &mut __struct.file_url {
7319            let val = buf.get_u8();
7320            *v = val;
7321        }
7322        Ok(__struct)
7323    }
7324    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7325        let mut __tmp = BytesMut::new(bytes);
7326        #[allow(clippy::absurd_extreme_comparisons)]
7327        #[allow(unused_comparisons)]
7328        if __tmp.remaining() < Self::ENCODED_LEN {
7329            panic!(
7330                "buffer is too small (need {} bytes, but got {})",
7331                Self::ENCODED_LEN,
7332                __tmp.remaining(),
7333            )
7334        }
7335        __tmp.put_u64_le(self.time_utc);
7336        __tmp.put_u32_le(self.time_boot_ms);
7337        __tmp.put_i32_le(self.lat);
7338        __tmp.put_i32_le(self.lon);
7339        __tmp.put_i32_le(self.alt);
7340        __tmp.put_i32_le(self.relative_alt);
7341        for val in &self.q {
7342            __tmp.put_f32_le(*val);
7343        }
7344        __tmp.put_i32_le(self.image_index);
7345        __tmp.put_u8(self.camera_id);
7346        __tmp.put_i8(self.capture_result);
7347        for val in &self.file_url {
7348            __tmp.put_u8(*val);
7349        }
7350        if matches!(version, MavlinkVersion::V2) {
7351            let len = __tmp.len();
7352            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7353        } else {
7354            __tmp.len()
7355        }
7356    }
7357}
7358#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7359#[doc = ""]
7360#[doc = "ID: 259"]
7361#[derive(Debug, Clone, PartialEq)]
7362#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7363#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7364#[cfg_attr(feature = "ts", derive(TS))]
7365#[cfg_attr(feature = "ts", ts(export))]
7366pub struct CAMERA_INFORMATION_DATA {
7367    #[doc = "Timestamp (time since system boot)."]
7368    pub time_boot_ms: u32,
7369    #[doc = "0xff). Use 0 if not known."]
7370    pub firmware_version: u32,
7371    #[doc = "Focal length. Use NaN if not known."]
7372    pub focal_length: f32,
7373    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7374    pub sensor_size_h: f32,
7375    #[doc = "Image sensor size vertical. Use NaN if not known."]
7376    pub sensor_size_v: f32,
7377    #[doc = "Bitmap of camera capability flags."]
7378    pub flags: CameraCapFlags,
7379    #[doc = "Horizontal image resolution. Use 0 if not known."]
7380    pub resolution_h: u16,
7381    #[doc = "Vertical image resolution. Use 0 if not known."]
7382    pub resolution_v: u16,
7383    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7384    pub cam_definition_version: u16,
7385    #[doc = "Name of the camera vendor"]
7386    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7387    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7388    pub vendor_name: [u8; 32],
7389    #[doc = "Name of the camera model"]
7390    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7391    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7392    pub model_name: [u8; 32],
7393    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7394    pub lens_id: u8,
7395    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7396    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7397    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7398    pub cam_definition_uri: [u8; 140],
7399    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7400    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7401    pub gimbal_device_id: u8,
7402    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7403    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7404    pub camera_device_id: u8,
7405}
7406impl CAMERA_INFORMATION_DATA {
7407    pub const ENCODED_LEN: usize = 237usize;
7408    pub const DEFAULT: Self = Self {
7409        time_boot_ms: 0_u32,
7410        firmware_version: 0_u32,
7411        focal_length: 0.0_f32,
7412        sensor_size_h: 0.0_f32,
7413        sensor_size_v: 0.0_f32,
7414        flags: CameraCapFlags::DEFAULT,
7415        resolution_h: 0_u16,
7416        resolution_v: 0_u16,
7417        cam_definition_version: 0_u16,
7418        vendor_name: [0_u8; 32usize],
7419        model_name: [0_u8; 32usize],
7420        lens_id: 0_u8,
7421        cam_definition_uri: [0_u8; 140usize],
7422        gimbal_device_id: 0_u8,
7423        camera_device_id: 0_u8,
7424    };
7425    #[cfg(feature = "arbitrary")]
7426    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7427        use arbitrary::{Arbitrary, Unstructured};
7428        let mut buf = [0u8; 1024];
7429        rng.fill_bytes(&mut buf);
7430        let mut unstructured = Unstructured::new(&buf);
7431        Self::arbitrary(&mut unstructured).unwrap_or_default()
7432    }
7433}
7434impl Default for CAMERA_INFORMATION_DATA {
7435    fn default() -> Self {
7436        Self::DEFAULT.clone()
7437    }
7438}
7439impl MessageData for CAMERA_INFORMATION_DATA {
7440    type Message = MavMessage;
7441    const ID: u32 = 259u32;
7442    const NAME: &'static str = "CAMERA_INFORMATION";
7443    const EXTRA_CRC: u8 = 92u8;
7444    const ENCODED_LEN: usize = 237usize;
7445    fn deser(
7446        _version: MavlinkVersion,
7447        __input: &[u8],
7448    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7449        let avail_len = __input.len();
7450        let mut payload_buf = [0; Self::ENCODED_LEN];
7451        let mut buf = if avail_len < Self::ENCODED_LEN {
7452            payload_buf[0..avail_len].copy_from_slice(__input);
7453            Bytes::new(&payload_buf)
7454        } else {
7455            Bytes::new(__input)
7456        };
7457        let mut __struct = Self::default();
7458        __struct.time_boot_ms = buf.get_u32_le();
7459        __struct.firmware_version = buf.get_u32_le();
7460        __struct.focal_length = buf.get_f32_le();
7461        __struct.sensor_size_h = buf.get_f32_le();
7462        __struct.sensor_size_v = buf.get_f32_le();
7463        let tmp = buf.get_u32_le();
7464        __struct.flags = CameraCapFlags::from_bits(tmp & CameraCapFlags::all().bits()).ok_or(
7465            ::mavlink_core::error::ParserError::InvalidFlag {
7466                flag_type: "CameraCapFlags",
7467                value: tmp as u32,
7468            },
7469        )?;
7470        __struct.resolution_h = buf.get_u16_le();
7471        __struct.resolution_v = buf.get_u16_le();
7472        __struct.cam_definition_version = buf.get_u16_le();
7473        for v in &mut __struct.vendor_name {
7474            let val = buf.get_u8();
7475            *v = val;
7476        }
7477        for v in &mut __struct.model_name {
7478            let val = buf.get_u8();
7479            *v = val;
7480        }
7481        __struct.lens_id = buf.get_u8();
7482        for v in &mut __struct.cam_definition_uri {
7483            let val = buf.get_u8();
7484            *v = val;
7485        }
7486        __struct.gimbal_device_id = buf.get_u8();
7487        __struct.camera_device_id = buf.get_u8();
7488        Ok(__struct)
7489    }
7490    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7491        let mut __tmp = BytesMut::new(bytes);
7492        #[allow(clippy::absurd_extreme_comparisons)]
7493        #[allow(unused_comparisons)]
7494        if __tmp.remaining() < Self::ENCODED_LEN {
7495            panic!(
7496                "buffer is too small (need {} bytes, but got {})",
7497                Self::ENCODED_LEN,
7498                __tmp.remaining(),
7499            )
7500        }
7501        __tmp.put_u32_le(self.time_boot_ms);
7502        __tmp.put_u32_le(self.firmware_version);
7503        __tmp.put_f32_le(self.focal_length);
7504        __tmp.put_f32_le(self.sensor_size_h);
7505        __tmp.put_f32_le(self.sensor_size_v);
7506        __tmp.put_u32_le(self.flags.bits());
7507        __tmp.put_u16_le(self.resolution_h);
7508        __tmp.put_u16_le(self.resolution_v);
7509        __tmp.put_u16_le(self.cam_definition_version);
7510        for val in &self.vendor_name {
7511            __tmp.put_u8(*val);
7512        }
7513        for val in &self.model_name {
7514            __tmp.put_u8(*val);
7515        }
7516        __tmp.put_u8(self.lens_id);
7517        for val in &self.cam_definition_uri {
7518            __tmp.put_u8(*val);
7519        }
7520        if matches!(version, MavlinkVersion::V2) {
7521            __tmp.put_u8(self.gimbal_device_id);
7522            __tmp.put_u8(self.camera_device_id);
7523            let len = __tmp.len();
7524            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7525        } else {
7526            __tmp.len()
7527        }
7528    }
7529}
7530#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7531#[doc = ""]
7532#[doc = "ID: 260"]
7533#[derive(Debug, Clone, PartialEq)]
7534#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7535#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7536#[cfg_attr(feature = "ts", derive(TS))]
7537#[cfg_attr(feature = "ts", ts(export))]
7538pub struct CAMERA_SETTINGS_DATA {
7539    #[doc = "Timestamp (time since system boot)."]
7540    pub time_boot_ms: u32,
7541    #[doc = "Camera mode"]
7542    pub mode_id: CameraMode,
7543    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7544    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7545    pub zoomLevel: f32,
7546    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7547    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7548    pub focusLevel: f32,
7549    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7550    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7551    pub camera_device_id: u8,
7552}
7553impl CAMERA_SETTINGS_DATA {
7554    pub const ENCODED_LEN: usize = 14usize;
7555    pub const DEFAULT: Self = Self {
7556        time_boot_ms: 0_u32,
7557        mode_id: CameraMode::DEFAULT,
7558        zoomLevel: 0.0_f32,
7559        focusLevel: 0.0_f32,
7560        camera_device_id: 0_u8,
7561    };
7562    #[cfg(feature = "arbitrary")]
7563    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7564        use arbitrary::{Arbitrary, Unstructured};
7565        let mut buf = [0u8; 1024];
7566        rng.fill_bytes(&mut buf);
7567        let mut unstructured = Unstructured::new(&buf);
7568        Self::arbitrary(&mut unstructured).unwrap_or_default()
7569    }
7570}
7571impl Default for CAMERA_SETTINGS_DATA {
7572    fn default() -> Self {
7573        Self::DEFAULT.clone()
7574    }
7575}
7576impl MessageData for CAMERA_SETTINGS_DATA {
7577    type Message = MavMessage;
7578    const ID: u32 = 260u32;
7579    const NAME: &'static str = "CAMERA_SETTINGS";
7580    const EXTRA_CRC: u8 = 146u8;
7581    const ENCODED_LEN: usize = 14usize;
7582    fn deser(
7583        _version: MavlinkVersion,
7584        __input: &[u8],
7585    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7586        let avail_len = __input.len();
7587        let mut payload_buf = [0; Self::ENCODED_LEN];
7588        let mut buf = if avail_len < Self::ENCODED_LEN {
7589            payload_buf[0..avail_len].copy_from_slice(__input);
7590            Bytes::new(&payload_buf)
7591        } else {
7592            Bytes::new(__input)
7593        };
7594        let mut __struct = Self::default();
7595        __struct.time_boot_ms = buf.get_u32_le();
7596        let tmp = buf.get_u8();
7597        __struct.mode_id =
7598            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7599                enum_type: "CameraMode",
7600                value: tmp as u32,
7601            })?;
7602        __struct.zoomLevel = buf.get_f32_le();
7603        __struct.focusLevel = buf.get_f32_le();
7604        __struct.camera_device_id = buf.get_u8();
7605        Ok(__struct)
7606    }
7607    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7608        let mut __tmp = BytesMut::new(bytes);
7609        #[allow(clippy::absurd_extreme_comparisons)]
7610        #[allow(unused_comparisons)]
7611        if __tmp.remaining() < Self::ENCODED_LEN {
7612            panic!(
7613                "buffer is too small (need {} bytes, but got {})",
7614                Self::ENCODED_LEN,
7615                __tmp.remaining(),
7616            )
7617        }
7618        __tmp.put_u32_le(self.time_boot_ms);
7619        __tmp.put_u8(self.mode_id as u8);
7620        if matches!(version, MavlinkVersion::V2) {
7621            __tmp.put_f32_le(self.zoomLevel);
7622            __tmp.put_f32_le(self.focusLevel);
7623            __tmp.put_u8(self.camera_device_id);
7624            let len = __tmp.len();
7625            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7626        } else {
7627            __tmp.len()
7628        }
7629    }
7630}
7631#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
7632#[doc = ""]
7633#[doc = "ID: 277"]
7634#[derive(Debug, Clone, PartialEq)]
7635#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7637#[cfg_attr(feature = "ts", derive(TS))]
7638#[cfg_attr(feature = "ts", ts(export))]
7639pub struct CAMERA_THERMAL_RANGE_DATA {
7640    #[doc = "Timestamp (time since system boot)."]
7641    pub time_boot_ms: u32,
7642    #[doc = "Temperature max."]
7643    pub max: f32,
7644    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7645    pub max_point_x: f32,
7646    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7647    pub max_point_y: f32,
7648    #[doc = "Temperature min."]
7649    pub min: f32,
7650    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7651    pub min_point_x: f32,
7652    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7653    pub min_point_y: f32,
7654    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
7655    pub stream_id: u8,
7656    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7657    pub camera_device_id: u8,
7658}
7659impl CAMERA_THERMAL_RANGE_DATA {
7660    pub const ENCODED_LEN: usize = 30usize;
7661    pub const DEFAULT: Self = Self {
7662        time_boot_ms: 0_u32,
7663        max: 0.0_f32,
7664        max_point_x: 0.0_f32,
7665        max_point_y: 0.0_f32,
7666        min: 0.0_f32,
7667        min_point_x: 0.0_f32,
7668        min_point_y: 0.0_f32,
7669        stream_id: 0_u8,
7670        camera_device_id: 0_u8,
7671    };
7672    #[cfg(feature = "arbitrary")]
7673    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7674        use arbitrary::{Arbitrary, Unstructured};
7675        let mut buf = [0u8; 1024];
7676        rng.fill_bytes(&mut buf);
7677        let mut unstructured = Unstructured::new(&buf);
7678        Self::arbitrary(&mut unstructured).unwrap_or_default()
7679    }
7680}
7681impl Default for CAMERA_THERMAL_RANGE_DATA {
7682    fn default() -> Self {
7683        Self::DEFAULT.clone()
7684    }
7685}
7686impl MessageData for CAMERA_THERMAL_RANGE_DATA {
7687    type Message = MavMessage;
7688    const ID: u32 = 277u32;
7689    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
7690    const EXTRA_CRC: u8 = 62u8;
7691    const ENCODED_LEN: usize = 30usize;
7692    fn deser(
7693        _version: MavlinkVersion,
7694        __input: &[u8],
7695    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7696        let avail_len = __input.len();
7697        let mut payload_buf = [0; Self::ENCODED_LEN];
7698        let mut buf = if avail_len < Self::ENCODED_LEN {
7699            payload_buf[0..avail_len].copy_from_slice(__input);
7700            Bytes::new(&payload_buf)
7701        } else {
7702            Bytes::new(__input)
7703        };
7704        let mut __struct = Self::default();
7705        __struct.time_boot_ms = buf.get_u32_le();
7706        __struct.max = buf.get_f32_le();
7707        __struct.max_point_x = buf.get_f32_le();
7708        __struct.max_point_y = buf.get_f32_le();
7709        __struct.min = buf.get_f32_le();
7710        __struct.min_point_x = buf.get_f32_le();
7711        __struct.min_point_y = buf.get_f32_le();
7712        __struct.stream_id = buf.get_u8();
7713        __struct.camera_device_id = buf.get_u8();
7714        Ok(__struct)
7715    }
7716    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7717        let mut __tmp = BytesMut::new(bytes);
7718        #[allow(clippy::absurd_extreme_comparisons)]
7719        #[allow(unused_comparisons)]
7720        if __tmp.remaining() < Self::ENCODED_LEN {
7721            panic!(
7722                "buffer is too small (need {} bytes, but got {})",
7723                Self::ENCODED_LEN,
7724                __tmp.remaining(),
7725            )
7726        }
7727        __tmp.put_u32_le(self.time_boot_ms);
7728        __tmp.put_f32_le(self.max);
7729        __tmp.put_f32_le(self.max_point_x);
7730        __tmp.put_f32_le(self.max_point_y);
7731        __tmp.put_f32_le(self.min);
7732        __tmp.put_f32_le(self.min_point_x);
7733        __tmp.put_f32_le(self.min_point_y);
7734        __tmp.put_u8(self.stream_id);
7735        __tmp.put_u8(self.camera_device_id);
7736        if matches!(version, MavlinkVersion::V2) {
7737            let len = __tmp.len();
7738            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7739        } else {
7740            __tmp.len()
7741        }
7742    }
7743}
7744#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7745#[doc = ""]
7746#[doc = "ID: 276"]
7747#[derive(Debug, Clone, PartialEq)]
7748#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7749#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7750#[cfg_attr(feature = "ts", derive(TS))]
7751#[cfg_attr(feature = "ts", ts(export))]
7752pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
7753    #[doc = "Latitude of tracked object"]
7754    pub lat: i32,
7755    #[doc = "Longitude of tracked object"]
7756    pub lon: i32,
7757    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
7758    pub alt: f32,
7759    #[doc = "Horizontal accuracy. NAN if unknown"]
7760    pub h_acc: f32,
7761    #[doc = "Vertical accuracy. NAN if unknown"]
7762    pub v_acc: f32,
7763    #[doc = "North velocity of tracked object. NAN if unknown"]
7764    pub vel_n: f32,
7765    #[doc = "East velocity of tracked object. NAN if unknown"]
7766    pub vel_e: f32,
7767    #[doc = "Down velocity of tracked object. NAN if unknown"]
7768    pub vel_d: f32,
7769    #[doc = "Velocity accuracy. NAN if unknown"]
7770    pub vel_acc: f32,
7771    #[doc = "Distance between camera and tracked object. NAN if unknown"]
7772    pub dist: f32,
7773    #[doc = "Heading in radians, in NED. NAN if unknown"]
7774    pub hdg: f32,
7775    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
7776    pub hdg_acc: f32,
7777    #[doc = "Current tracking status"]
7778    pub tracking_status: CameraTrackingStatusFlags,
7779    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7780    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7781    pub camera_device_id: u8,
7782}
7783impl CAMERA_TRACKING_GEO_STATUS_DATA {
7784    pub const ENCODED_LEN: usize = 50usize;
7785    pub const DEFAULT: Self = Self {
7786        lat: 0_i32,
7787        lon: 0_i32,
7788        alt: 0.0_f32,
7789        h_acc: 0.0_f32,
7790        v_acc: 0.0_f32,
7791        vel_n: 0.0_f32,
7792        vel_e: 0.0_f32,
7793        vel_d: 0.0_f32,
7794        vel_acc: 0.0_f32,
7795        dist: 0.0_f32,
7796        hdg: 0.0_f32,
7797        hdg_acc: 0.0_f32,
7798        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7799        camera_device_id: 0_u8,
7800    };
7801    #[cfg(feature = "arbitrary")]
7802    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7803        use arbitrary::{Arbitrary, Unstructured};
7804        let mut buf = [0u8; 1024];
7805        rng.fill_bytes(&mut buf);
7806        let mut unstructured = Unstructured::new(&buf);
7807        Self::arbitrary(&mut unstructured).unwrap_or_default()
7808    }
7809}
7810impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
7811    fn default() -> Self {
7812        Self::DEFAULT.clone()
7813    }
7814}
7815impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
7816    type Message = MavMessage;
7817    const ID: u32 = 276u32;
7818    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
7819    const EXTRA_CRC: u8 = 18u8;
7820    const ENCODED_LEN: usize = 50usize;
7821    fn deser(
7822        _version: MavlinkVersion,
7823        __input: &[u8],
7824    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7825        let avail_len = __input.len();
7826        let mut payload_buf = [0; Self::ENCODED_LEN];
7827        let mut buf = if avail_len < Self::ENCODED_LEN {
7828            payload_buf[0..avail_len].copy_from_slice(__input);
7829            Bytes::new(&payload_buf)
7830        } else {
7831            Bytes::new(__input)
7832        };
7833        let mut __struct = Self::default();
7834        __struct.lat = buf.get_i32_le();
7835        __struct.lon = buf.get_i32_le();
7836        __struct.alt = buf.get_f32_le();
7837        __struct.h_acc = buf.get_f32_le();
7838        __struct.v_acc = buf.get_f32_le();
7839        __struct.vel_n = buf.get_f32_le();
7840        __struct.vel_e = buf.get_f32_le();
7841        __struct.vel_d = buf.get_f32_le();
7842        __struct.vel_acc = buf.get_f32_le();
7843        __struct.dist = buf.get_f32_le();
7844        __struct.hdg = buf.get_f32_le();
7845        __struct.hdg_acc = buf.get_f32_le();
7846        let tmp = buf.get_u8();
7847        __struct.tracking_status =
7848            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7849                enum_type: "CameraTrackingStatusFlags",
7850                value: tmp as u32,
7851            })?;
7852        __struct.camera_device_id = buf.get_u8();
7853        Ok(__struct)
7854    }
7855    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7856        let mut __tmp = BytesMut::new(bytes);
7857        #[allow(clippy::absurd_extreme_comparisons)]
7858        #[allow(unused_comparisons)]
7859        if __tmp.remaining() < Self::ENCODED_LEN {
7860            panic!(
7861                "buffer is too small (need {} bytes, but got {})",
7862                Self::ENCODED_LEN,
7863                __tmp.remaining(),
7864            )
7865        }
7866        __tmp.put_i32_le(self.lat);
7867        __tmp.put_i32_le(self.lon);
7868        __tmp.put_f32_le(self.alt);
7869        __tmp.put_f32_le(self.h_acc);
7870        __tmp.put_f32_le(self.v_acc);
7871        __tmp.put_f32_le(self.vel_n);
7872        __tmp.put_f32_le(self.vel_e);
7873        __tmp.put_f32_le(self.vel_d);
7874        __tmp.put_f32_le(self.vel_acc);
7875        __tmp.put_f32_le(self.dist);
7876        __tmp.put_f32_le(self.hdg);
7877        __tmp.put_f32_le(self.hdg_acc);
7878        __tmp.put_u8(self.tracking_status as u8);
7879        if matches!(version, MavlinkVersion::V2) {
7880            __tmp.put_u8(self.camera_device_id);
7881            let len = __tmp.len();
7882            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7883        } else {
7884            __tmp.len()
7885        }
7886    }
7887}
7888#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7889#[doc = ""]
7890#[doc = "ID: 275"]
7891#[derive(Debug, Clone, PartialEq)]
7892#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7893#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7894#[cfg_attr(feature = "ts", derive(TS))]
7895#[cfg_attr(feature = "ts", ts(export))]
7896pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
7897    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7898    pub point_x: f32,
7899    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7900    pub point_y: f32,
7901    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
7902    pub radius: f32,
7903    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7904    pub rec_top_x: f32,
7905    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7906    pub rec_top_y: f32,
7907    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7908    pub rec_bottom_x: f32,
7909    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7910    pub rec_bottom_y: f32,
7911    #[doc = "Current tracking status"]
7912    pub tracking_status: CameraTrackingStatusFlags,
7913    #[doc = "Current tracking mode"]
7914    pub tracking_mode: CameraTrackingMode,
7915    #[doc = "Defines location of target data"]
7916    pub target_data: CameraTrackingTargetData,
7917    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7918    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7919    pub camera_device_id: u8,
7920}
7921impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
7922    pub const ENCODED_LEN: usize = 32usize;
7923    pub const DEFAULT: Self = Self {
7924        point_x: 0.0_f32,
7925        point_y: 0.0_f32,
7926        radius: 0.0_f32,
7927        rec_top_x: 0.0_f32,
7928        rec_top_y: 0.0_f32,
7929        rec_bottom_x: 0.0_f32,
7930        rec_bottom_y: 0.0_f32,
7931        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7932        tracking_mode: CameraTrackingMode::DEFAULT,
7933        target_data: CameraTrackingTargetData::DEFAULT,
7934        camera_device_id: 0_u8,
7935    };
7936    #[cfg(feature = "arbitrary")]
7937    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7938        use arbitrary::{Arbitrary, Unstructured};
7939        let mut buf = [0u8; 1024];
7940        rng.fill_bytes(&mut buf);
7941        let mut unstructured = Unstructured::new(&buf);
7942        Self::arbitrary(&mut unstructured).unwrap_or_default()
7943    }
7944}
7945impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7946    fn default() -> Self {
7947        Self::DEFAULT.clone()
7948    }
7949}
7950impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7951    type Message = MavMessage;
7952    const ID: u32 = 275u32;
7953    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
7954    const EXTRA_CRC: u8 = 126u8;
7955    const ENCODED_LEN: usize = 32usize;
7956    fn deser(
7957        _version: MavlinkVersion,
7958        __input: &[u8],
7959    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7960        let avail_len = __input.len();
7961        let mut payload_buf = [0; Self::ENCODED_LEN];
7962        let mut buf = if avail_len < Self::ENCODED_LEN {
7963            payload_buf[0..avail_len].copy_from_slice(__input);
7964            Bytes::new(&payload_buf)
7965        } else {
7966            Bytes::new(__input)
7967        };
7968        let mut __struct = Self::default();
7969        __struct.point_x = buf.get_f32_le();
7970        __struct.point_y = buf.get_f32_le();
7971        __struct.radius = buf.get_f32_le();
7972        __struct.rec_top_x = buf.get_f32_le();
7973        __struct.rec_top_y = buf.get_f32_le();
7974        __struct.rec_bottom_x = buf.get_f32_le();
7975        __struct.rec_bottom_y = buf.get_f32_le();
7976        let tmp = buf.get_u8();
7977        __struct.tracking_status =
7978            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7979                enum_type: "CameraTrackingStatusFlags",
7980                value: tmp as u32,
7981            })?;
7982        let tmp = buf.get_u8();
7983        __struct.tracking_mode =
7984            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7985                enum_type: "CameraTrackingMode",
7986                value: tmp as u32,
7987            })?;
7988        let tmp = buf.get_u8();
7989        __struct.target_data =
7990            CameraTrackingTargetData::from_bits(tmp & CameraTrackingTargetData::all().bits())
7991                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7992                    flag_type: "CameraTrackingTargetData",
7993                    value: tmp as u32,
7994                })?;
7995        __struct.camera_device_id = buf.get_u8();
7996        Ok(__struct)
7997    }
7998    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7999        let mut __tmp = BytesMut::new(bytes);
8000        #[allow(clippy::absurd_extreme_comparisons)]
8001        #[allow(unused_comparisons)]
8002        if __tmp.remaining() < Self::ENCODED_LEN {
8003            panic!(
8004                "buffer is too small (need {} bytes, but got {})",
8005                Self::ENCODED_LEN,
8006                __tmp.remaining(),
8007            )
8008        }
8009        __tmp.put_f32_le(self.point_x);
8010        __tmp.put_f32_le(self.point_y);
8011        __tmp.put_f32_le(self.radius);
8012        __tmp.put_f32_le(self.rec_top_x);
8013        __tmp.put_f32_le(self.rec_top_y);
8014        __tmp.put_f32_le(self.rec_bottom_x);
8015        __tmp.put_f32_le(self.rec_bottom_y);
8016        __tmp.put_u8(self.tracking_status as u8);
8017        __tmp.put_u8(self.tracking_mode as u8);
8018        __tmp.put_u8(self.target_data.bits());
8019        if matches!(version, MavlinkVersion::V2) {
8020            __tmp.put_u8(self.camera_device_id);
8021            let len = __tmp.len();
8022            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8023        } else {
8024            __tmp.len()
8025        }
8026    }
8027}
8028#[doc = "Camera-IMU triggering and synchronisation message."]
8029#[doc = ""]
8030#[doc = "ID: 112"]
8031#[derive(Debug, Clone, PartialEq)]
8032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8033#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8034#[cfg_attr(feature = "ts", derive(TS))]
8035#[cfg_attr(feature = "ts", ts(export))]
8036pub struct CAMERA_TRIGGER_DATA {
8037    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8038    pub time_usec: u64,
8039    #[doc = "Image frame sequence"]
8040    pub seq: u32,
8041}
8042impl CAMERA_TRIGGER_DATA {
8043    pub const ENCODED_LEN: usize = 12usize;
8044    pub const DEFAULT: Self = Self {
8045        time_usec: 0_u64,
8046        seq: 0_u32,
8047    };
8048    #[cfg(feature = "arbitrary")]
8049    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8050        use arbitrary::{Arbitrary, Unstructured};
8051        let mut buf = [0u8; 1024];
8052        rng.fill_bytes(&mut buf);
8053        let mut unstructured = Unstructured::new(&buf);
8054        Self::arbitrary(&mut unstructured).unwrap_or_default()
8055    }
8056}
8057impl Default for CAMERA_TRIGGER_DATA {
8058    fn default() -> Self {
8059        Self::DEFAULT.clone()
8060    }
8061}
8062impl MessageData for CAMERA_TRIGGER_DATA {
8063    type Message = MavMessage;
8064    const ID: u32 = 112u32;
8065    const NAME: &'static str = "CAMERA_TRIGGER";
8066    const EXTRA_CRC: u8 = 174u8;
8067    const ENCODED_LEN: usize = 12usize;
8068    fn deser(
8069        _version: MavlinkVersion,
8070        __input: &[u8],
8071    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8072        let avail_len = __input.len();
8073        let mut payload_buf = [0; Self::ENCODED_LEN];
8074        let mut buf = if avail_len < Self::ENCODED_LEN {
8075            payload_buf[0..avail_len].copy_from_slice(__input);
8076            Bytes::new(&payload_buf)
8077        } else {
8078            Bytes::new(__input)
8079        };
8080        let mut __struct = Self::default();
8081        __struct.time_usec = buf.get_u64_le();
8082        __struct.seq = buf.get_u32_le();
8083        Ok(__struct)
8084    }
8085    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8086        let mut __tmp = BytesMut::new(bytes);
8087        #[allow(clippy::absurd_extreme_comparisons)]
8088        #[allow(unused_comparisons)]
8089        if __tmp.remaining() < Self::ENCODED_LEN {
8090            panic!(
8091                "buffer is too small (need {} bytes, but got {})",
8092                Self::ENCODED_LEN,
8093                __tmp.remaining(),
8094            )
8095        }
8096        __tmp.put_u64_le(self.time_usec);
8097        __tmp.put_u32_le(self.seq);
8098        if matches!(version, MavlinkVersion::V2) {
8099            let len = __tmp.len();
8100            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8101        } else {
8102            __tmp.len()
8103        }
8104    }
8105}
8106#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8107#[doc = ""]
8108#[doc = "ID: 387"]
8109#[derive(Debug, Clone, PartialEq)]
8110#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8111#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8112#[cfg_attr(feature = "ts", derive(TS))]
8113#[cfg_attr(feature = "ts", ts(export))]
8114pub struct CANFD_FRAME_DATA {
8115    #[doc = "Frame ID"]
8116    pub id: u32,
8117    #[doc = "System ID."]
8118    pub target_system: u8,
8119    #[doc = "Component ID."]
8120    pub target_component: u8,
8121    #[doc = "bus number"]
8122    pub bus: u8,
8123    #[doc = "Frame length"]
8124    pub len: u8,
8125    #[doc = "Frame data"]
8126    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8127    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8128    pub data: [u8; 64],
8129}
8130impl CANFD_FRAME_DATA {
8131    pub const ENCODED_LEN: usize = 72usize;
8132    pub const DEFAULT: Self = Self {
8133        id: 0_u32,
8134        target_system: 0_u8,
8135        target_component: 0_u8,
8136        bus: 0_u8,
8137        len: 0_u8,
8138        data: [0_u8; 64usize],
8139    };
8140    #[cfg(feature = "arbitrary")]
8141    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8142        use arbitrary::{Arbitrary, Unstructured};
8143        let mut buf = [0u8; 1024];
8144        rng.fill_bytes(&mut buf);
8145        let mut unstructured = Unstructured::new(&buf);
8146        Self::arbitrary(&mut unstructured).unwrap_or_default()
8147    }
8148}
8149impl Default for CANFD_FRAME_DATA {
8150    fn default() -> Self {
8151        Self::DEFAULT.clone()
8152    }
8153}
8154impl MessageData for CANFD_FRAME_DATA {
8155    type Message = MavMessage;
8156    const ID: u32 = 387u32;
8157    const NAME: &'static str = "CANFD_FRAME";
8158    const EXTRA_CRC: u8 = 4u8;
8159    const ENCODED_LEN: usize = 72usize;
8160    fn deser(
8161        _version: MavlinkVersion,
8162        __input: &[u8],
8163    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8164        let avail_len = __input.len();
8165        let mut payload_buf = [0; Self::ENCODED_LEN];
8166        let mut buf = if avail_len < Self::ENCODED_LEN {
8167            payload_buf[0..avail_len].copy_from_slice(__input);
8168            Bytes::new(&payload_buf)
8169        } else {
8170            Bytes::new(__input)
8171        };
8172        let mut __struct = Self::default();
8173        __struct.id = buf.get_u32_le();
8174        __struct.target_system = buf.get_u8();
8175        __struct.target_component = buf.get_u8();
8176        __struct.bus = buf.get_u8();
8177        __struct.len = buf.get_u8();
8178        for v in &mut __struct.data {
8179            let val = buf.get_u8();
8180            *v = val;
8181        }
8182        Ok(__struct)
8183    }
8184    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8185        let mut __tmp = BytesMut::new(bytes);
8186        #[allow(clippy::absurd_extreme_comparisons)]
8187        #[allow(unused_comparisons)]
8188        if __tmp.remaining() < Self::ENCODED_LEN {
8189            panic!(
8190                "buffer is too small (need {} bytes, but got {})",
8191                Self::ENCODED_LEN,
8192                __tmp.remaining(),
8193            )
8194        }
8195        __tmp.put_u32_le(self.id);
8196        __tmp.put_u8(self.target_system);
8197        __tmp.put_u8(self.target_component);
8198        __tmp.put_u8(self.bus);
8199        __tmp.put_u8(self.len);
8200        for val in &self.data {
8201            __tmp.put_u8(*val);
8202        }
8203        if matches!(version, MavlinkVersion::V2) {
8204            let len = __tmp.len();
8205            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8206        } else {
8207            __tmp.len()
8208        }
8209    }
8210}
8211#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8212#[doc = ""]
8213#[doc = "ID: 388"]
8214#[derive(Debug, Clone, PartialEq)]
8215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8216#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8217#[cfg_attr(feature = "ts", derive(TS))]
8218#[cfg_attr(feature = "ts", ts(export))]
8219pub struct CAN_FILTER_MODIFY_DATA {
8220    #[doc = "filter IDs, length num_ids"]
8221    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8222    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8223    pub ids: [u16; 16],
8224    #[doc = "System ID."]
8225    pub target_system: u8,
8226    #[doc = "Component ID."]
8227    pub target_component: u8,
8228    #[doc = "bus number"]
8229    pub bus: u8,
8230    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8231    pub operation: CanFilterOp,
8232    #[doc = "number of IDs in filter list"]
8233    pub num_ids: u8,
8234}
8235impl CAN_FILTER_MODIFY_DATA {
8236    pub const ENCODED_LEN: usize = 37usize;
8237    pub const DEFAULT: Self = Self {
8238        ids: [0_u16; 16usize],
8239        target_system: 0_u8,
8240        target_component: 0_u8,
8241        bus: 0_u8,
8242        operation: CanFilterOp::DEFAULT,
8243        num_ids: 0_u8,
8244    };
8245    #[cfg(feature = "arbitrary")]
8246    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8247        use arbitrary::{Arbitrary, Unstructured};
8248        let mut buf = [0u8; 1024];
8249        rng.fill_bytes(&mut buf);
8250        let mut unstructured = Unstructured::new(&buf);
8251        Self::arbitrary(&mut unstructured).unwrap_or_default()
8252    }
8253}
8254impl Default for CAN_FILTER_MODIFY_DATA {
8255    fn default() -> Self {
8256        Self::DEFAULT.clone()
8257    }
8258}
8259impl MessageData for CAN_FILTER_MODIFY_DATA {
8260    type Message = MavMessage;
8261    const ID: u32 = 388u32;
8262    const NAME: &'static str = "CAN_FILTER_MODIFY";
8263    const EXTRA_CRC: u8 = 8u8;
8264    const ENCODED_LEN: usize = 37usize;
8265    fn deser(
8266        _version: MavlinkVersion,
8267        __input: &[u8],
8268    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8269        let avail_len = __input.len();
8270        let mut payload_buf = [0; Self::ENCODED_LEN];
8271        let mut buf = if avail_len < Self::ENCODED_LEN {
8272            payload_buf[0..avail_len].copy_from_slice(__input);
8273            Bytes::new(&payload_buf)
8274        } else {
8275            Bytes::new(__input)
8276        };
8277        let mut __struct = Self::default();
8278        for v in &mut __struct.ids {
8279            let val = buf.get_u16_le();
8280            *v = val;
8281        }
8282        __struct.target_system = buf.get_u8();
8283        __struct.target_component = buf.get_u8();
8284        __struct.bus = buf.get_u8();
8285        let tmp = buf.get_u8();
8286        __struct.operation =
8287            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8288                enum_type: "CanFilterOp",
8289                value: tmp as u32,
8290            })?;
8291        __struct.num_ids = buf.get_u8();
8292        Ok(__struct)
8293    }
8294    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8295        let mut __tmp = BytesMut::new(bytes);
8296        #[allow(clippy::absurd_extreme_comparisons)]
8297        #[allow(unused_comparisons)]
8298        if __tmp.remaining() < Self::ENCODED_LEN {
8299            panic!(
8300                "buffer is too small (need {} bytes, but got {})",
8301                Self::ENCODED_LEN,
8302                __tmp.remaining(),
8303            )
8304        }
8305        for val in &self.ids {
8306            __tmp.put_u16_le(*val);
8307        }
8308        __tmp.put_u8(self.target_system);
8309        __tmp.put_u8(self.target_component);
8310        __tmp.put_u8(self.bus);
8311        __tmp.put_u8(self.operation as u8);
8312        __tmp.put_u8(self.num_ids);
8313        if matches!(version, MavlinkVersion::V2) {
8314            let len = __tmp.len();
8315            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8316        } else {
8317            __tmp.len()
8318        }
8319    }
8320}
8321#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8322#[doc = ""]
8323#[doc = "ID: 386"]
8324#[derive(Debug, Clone, PartialEq)]
8325#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8326#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8327#[cfg_attr(feature = "ts", derive(TS))]
8328#[cfg_attr(feature = "ts", ts(export))]
8329pub struct CAN_FRAME_DATA {
8330    #[doc = "Frame ID"]
8331    pub id: u32,
8332    #[doc = "System ID."]
8333    pub target_system: u8,
8334    #[doc = "Component ID."]
8335    pub target_component: u8,
8336    #[doc = "Bus number"]
8337    pub bus: u8,
8338    #[doc = "Frame length"]
8339    pub len: u8,
8340    #[doc = "Frame data"]
8341    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8342    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8343    pub data: [u8; 8],
8344}
8345impl CAN_FRAME_DATA {
8346    pub const ENCODED_LEN: usize = 16usize;
8347    pub const DEFAULT: Self = Self {
8348        id: 0_u32,
8349        target_system: 0_u8,
8350        target_component: 0_u8,
8351        bus: 0_u8,
8352        len: 0_u8,
8353        data: [0_u8; 8usize],
8354    };
8355    #[cfg(feature = "arbitrary")]
8356    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8357        use arbitrary::{Arbitrary, Unstructured};
8358        let mut buf = [0u8; 1024];
8359        rng.fill_bytes(&mut buf);
8360        let mut unstructured = Unstructured::new(&buf);
8361        Self::arbitrary(&mut unstructured).unwrap_or_default()
8362    }
8363}
8364impl Default for CAN_FRAME_DATA {
8365    fn default() -> Self {
8366        Self::DEFAULT.clone()
8367    }
8368}
8369impl MessageData for CAN_FRAME_DATA {
8370    type Message = MavMessage;
8371    const ID: u32 = 386u32;
8372    const NAME: &'static str = "CAN_FRAME";
8373    const EXTRA_CRC: u8 = 132u8;
8374    const ENCODED_LEN: usize = 16usize;
8375    fn deser(
8376        _version: MavlinkVersion,
8377        __input: &[u8],
8378    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8379        let avail_len = __input.len();
8380        let mut payload_buf = [0; Self::ENCODED_LEN];
8381        let mut buf = if avail_len < Self::ENCODED_LEN {
8382            payload_buf[0..avail_len].copy_from_slice(__input);
8383            Bytes::new(&payload_buf)
8384        } else {
8385            Bytes::new(__input)
8386        };
8387        let mut __struct = Self::default();
8388        __struct.id = buf.get_u32_le();
8389        __struct.target_system = buf.get_u8();
8390        __struct.target_component = buf.get_u8();
8391        __struct.bus = buf.get_u8();
8392        __struct.len = buf.get_u8();
8393        for v in &mut __struct.data {
8394            let val = buf.get_u8();
8395            *v = val;
8396        }
8397        Ok(__struct)
8398    }
8399    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8400        let mut __tmp = BytesMut::new(bytes);
8401        #[allow(clippy::absurd_extreme_comparisons)]
8402        #[allow(unused_comparisons)]
8403        if __tmp.remaining() < Self::ENCODED_LEN {
8404            panic!(
8405                "buffer is too small (need {} bytes, but got {})",
8406                Self::ENCODED_LEN,
8407                __tmp.remaining(),
8408            )
8409        }
8410        __tmp.put_u32_le(self.id);
8411        __tmp.put_u8(self.target_system);
8412        __tmp.put_u8(self.target_component);
8413        __tmp.put_u8(self.bus);
8414        __tmp.put_u8(self.len);
8415        for val in &self.data {
8416            __tmp.put_u8(*val);
8417        }
8418        if matches!(version, MavlinkVersion::V2) {
8419            let len = __tmp.len();
8420            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8421        } else {
8422            __tmp.len()
8423        }
8424    }
8425}
8426#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8427#[doc = ""]
8428#[doc = "ID: 336"]
8429#[derive(Debug, Clone, PartialEq)]
8430#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8431#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8432#[cfg_attr(feature = "ts", derive(TS))]
8433#[cfg_attr(feature = "ts", ts(export))]
8434pub struct CELLULAR_CONFIG_DATA {
8435    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8436    pub enable_lte: u8,
8437    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8438    pub enable_pin: u8,
8439    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8440    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8441    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8442    pub pin: [u8; 16],
8443    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8444    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8445    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8446    pub new_pin: [u8; 16],
8447    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8448    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8449    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8450    pub apn: [u8; 32],
8451    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8452    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8453    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8454    pub puk: [u8; 16],
8455    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8456    pub roaming: u8,
8457    #[doc = "Message acceptance response (sent back to GS)."]
8458    pub response: CellularConfigResponse,
8459}
8460impl CELLULAR_CONFIG_DATA {
8461    pub const ENCODED_LEN: usize = 84usize;
8462    pub const DEFAULT: Self = Self {
8463        enable_lte: 0_u8,
8464        enable_pin: 0_u8,
8465        pin: [0_u8; 16usize],
8466        new_pin: [0_u8; 16usize],
8467        apn: [0_u8; 32usize],
8468        puk: [0_u8; 16usize],
8469        roaming: 0_u8,
8470        response: CellularConfigResponse::DEFAULT,
8471    };
8472    #[cfg(feature = "arbitrary")]
8473    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8474        use arbitrary::{Arbitrary, Unstructured};
8475        let mut buf = [0u8; 1024];
8476        rng.fill_bytes(&mut buf);
8477        let mut unstructured = Unstructured::new(&buf);
8478        Self::arbitrary(&mut unstructured).unwrap_or_default()
8479    }
8480}
8481impl Default for CELLULAR_CONFIG_DATA {
8482    fn default() -> Self {
8483        Self::DEFAULT.clone()
8484    }
8485}
8486impl MessageData for CELLULAR_CONFIG_DATA {
8487    type Message = MavMessage;
8488    const ID: u32 = 336u32;
8489    const NAME: &'static str = "CELLULAR_CONFIG";
8490    const EXTRA_CRC: u8 = 245u8;
8491    const ENCODED_LEN: usize = 84usize;
8492    fn deser(
8493        _version: MavlinkVersion,
8494        __input: &[u8],
8495    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8496        let avail_len = __input.len();
8497        let mut payload_buf = [0; Self::ENCODED_LEN];
8498        let mut buf = if avail_len < Self::ENCODED_LEN {
8499            payload_buf[0..avail_len].copy_from_slice(__input);
8500            Bytes::new(&payload_buf)
8501        } else {
8502            Bytes::new(__input)
8503        };
8504        let mut __struct = Self::default();
8505        __struct.enable_lte = buf.get_u8();
8506        __struct.enable_pin = buf.get_u8();
8507        for v in &mut __struct.pin {
8508            let val = buf.get_u8();
8509            *v = val;
8510        }
8511        for v in &mut __struct.new_pin {
8512            let val = buf.get_u8();
8513            *v = val;
8514        }
8515        for v in &mut __struct.apn {
8516            let val = buf.get_u8();
8517            *v = val;
8518        }
8519        for v in &mut __struct.puk {
8520            let val = buf.get_u8();
8521            *v = val;
8522        }
8523        __struct.roaming = buf.get_u8();
8524        let tmp = buf.get_u8();
8525        __struct.response =
8526            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8527                enum_type: "CellularConfigResponse",
8528                value: tmp as u32,
8529            })?;
8530        Ok(__struct)
8531    }
8532    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8533        let mut __tmp = BytesMut::new(bytes);
8534        #[allow(clippy::absurd_extreme_comparisons)]
8535        #[allow(unused_comparisons)]
8536        if __tmp.remaining() < Self::ENCODED_LEN {
8537            panic!(
8538                "buffer is too small (need {} bytes, but got {})",
8539                Self::ENCODED_LEN,
8540                __tmp.remaining(),
8541            )
8542        }
8543        __tmp.put_u8(self.enable_lte);
8544        __tmp.put_u8(self.enable_pin);
8545        for val in &self.pin {
8546            __tmp.put_u8(*val);
8547        }
8548        for val in &self.new_pin {
8549            __tmp.put_u8(*val);
8550        }
8551        for val in &self.apn {
8552            __tmp.put_u8(*val);
8553        }
8554        for val in &self.puk {
8555            __tmp.put_u8(*val);
8556        }
8557        __tmp.put_u8(self.roaming);
8558        __tmp.put_u8(self.response as u8);
8559        if matches!(version, MavlinkVersion::V2) {
8560            let len = __tmp.len();
8561            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8562        } else {
8563            __tmp.len()
8564        }
8565    }
8566}
8567#[doc = "Report current used cellular network status."]
8568#[doc = ""]
8569#[doc = "ID: 334"]
8570#[derive(Debug, Clone, PartialEq)]
8571#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8572#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8573#[cfg_attr(feature = "ts", derive(TS))]
8574#[cfg_attr(feature = "ts", ts(export))]
8575pub struct CELLULAR_STATUS_DATA {
8576    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
8577    pub mcc: u16,
8578    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
8579    pub mnc: u16,
8580    #[doc = "Location area code. If unknown, set to 0"]
8581    pub lac: u16,
8582    #[doc = "Cellular modem status"]
8583    pub status: CellularStatusFlag,
8584    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
8585    pub failure_reason: CellularNetworkFailedReason,
8586    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
8587    pub mavtype: CellularNetworkRadioType,
8588    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
8589    pub quality: u8,
8590}
8591impl CELLULAR_STATUS_DATA {
8592    pub const ENCODED_LEN: usize = 10usize;
8593    pub const DEFAULT: Self = Self {
8594        mcc: 0_u16,
8595        mnc: 0_u16,
8596        lac: 0_u16,
8597        status: CellularStatusFlag::DEFAULT,
8598        failure_reason: CellularNetworkFailedReason::DEFAULT,
8599        mavtype: CellularNetworkRadioType::DEFAULT,
8600        quality: 0_u8,
8601    };
8602    #[cfg(feature = "arbitrary")]
8603    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8604        use arbitrary::{Arbitrary, Unstructured};
8605        let mut buf = [0u8; 1024];
8606        rng.fill_bytes(&mut buf);
8607        let mut unstructured = Unstructured::new(&buf);
8608        Self::arbitrary(&mut unstructured).unwrap_or_default()
8609    }
8610}
8611impl Default for CELLULAR_STATUS_DATA {
8612    fn default() -> Self {
8613        Self::DEFAULT.clone()
8614    }
8615}
8616impl MessageData for CELLULAR_STATUS_DATA {
8617    type Message = MavMessage;
8618    const ID: u32 = 334u32;
8619    const NAME: &'static str = "CELLULAR_STATUS";
8620    const EXTRA_CRC: u8 = 72u8;
8621    const ENCODED_LEN: usize = 10usize;
8622    fn deser(
8623        _version: MavlinkVersion,
8624        __input: &[u8],
8625    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8626        let avail_len = __input.len();
8627        let mut payload_buf = [0; Self::ENCODED_LEN];
8628        let mut buf = if avail_len < Self::ENCODED_LEN {
8629            payload_buf[0..avail_len].copy_from_slice(__input);
8630            Bytes::new(&payload_buf)
8631        } else {
8632            Bytes::new(__input)
8633        };
8634        let mut __struct = Self::default();
8635        __struct.mcc = buf.get_u16_le();
8636        __struct.mnc = buf.get_u16_le();
8637        __struct.lac = buf.get_u16_le();
8638        let tmp = buf.get_u8();
8639        __struct.status =
8640            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8641                enum_type: "CellularStatusFlag",
8642                value: tmp as u32,
8643            })?;
8644        let tmp = buf.get_u8();
8645        __struct.failure_reason =
8646            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8647                enum_type: "CellularNetworkFailedReason",
8648                value: tmp as u32,
8649            })?;
8650        let tmp = buf.get_u8();
8651        __struct.mavtype =
8652            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8653                enum_type: "CellularNetworkRadioType",
8654                value: tmp as u32,
8655            })?;
8656        __struct.quality = buf.get_u8();
8657        Ok(__struct)
8658    }
8659    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8660        let mut __tmp = BytesMut::new(bytes);
8661        #[allow(clippy::absurd_extreme_comparisons)]
8662        #[allow(unused_comparisons)]
8663        if __tmp.remaining() < Self::ENCODED_LEN {
8664            panic!(
8665                "buffer is too small (need {} bytes, but got {})",
8666                Self::ENCODED_LEN,
8667                __tmp.remaining(),
8668            )
8669        }
8670        __tmp.put_u16_le(self.mcc);
8671        __tmp.put_u16_le(self.mnc);
8672        __tmp.put_u16_le(self.lac);
8673        __tmp.put_u8(self.status as u8);
8674        __tmp.put_u8(self.failure_reason as u8);
8675        __tmp.put_u8(self.mavtype as u8);
8676        __tmp.put_u8(self.quality);
8677        if matches!(version, MavlinkVersion::V2) {
8678            let len = __tmp.len();
8679            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8680        } else {
8681            __tmp.len()
8682        }
8683    }
8684}
8685#[doc = "Request to control this MAV."]
8686#[doc = ""]
8687#[doc = "ID: 5"]
8688#[derive(Debug, Clone, PartialEq)]
8689#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8690#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8691#[cfg_attr(feature = "ts", derive(TS))]
8692#[cfg_attr(feature = "ts", ts(export))]
8693pub struct CHANGE_OPERATOR_CONTROL_DATA {
8694    #[doc = "System the GCS requests control for"]
8695    pub target_system: u8,
8696    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8697    pub control_request: u8,
8698    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
8699    pub version: u8,
8700    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
8701    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8702    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8703    pub passkey: [u8; 25],
8704}
8705impl CHANGE_OPERATOR_CONTROL_DATA {
8706    pub const ENCODED_LEN: usize = 28usize;
8707    pub const DEFAULT: Self = Self {
8708        target_system: 0_u8,
8709        control_request: 0_u8,
8710        version: 0_u8,
8711        passkey: [0_u8; 25usize],
8712    };
8713    #[cfg(feature = "arbitrary")]
8714    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8715        use arbitrary::{Arbitrary, Unstructured};
8716        let mut buf = [0u8; 1024];
8717        rng.fill_bytes(&mut buf);
8718        let mut unstructured = Unstructured::new(&buf);
8719        Self::arbitrary(&mut unstructured).unwrap_or_default()
8720    }
8721}
8722impl Default for CHANGE_OPERATOR_CONTROL_DATA {
8723    fn default() -> Self {
8724        Self::DEFAULT.clone()
8725    }
8726}
8727impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
8728    type Message = MavMessage;
8729    const ID: u32 = 5u32;
8730    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
8731    const EXTRA_CRC: u8 = 217u8;
8732    const ENCODED_LEN: usize = 28usize;
8733    fn deser(
8734        _version: MavlinkVersion,
8735        __input: &[u8],
8736    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8737        let avail_len = __input.len();
8738        let mut payload_buf = [0; Self::ENCODED_LEN];
8739        let mut buf = if avail_len < Self::ENCODED_LEN {
8740            payload_buf[0..avail_len].copy_from_slice(__input);
8741            Bytes::new(&payload_buf)
8742        } else {
8743            Bytes::new(__input)
8744        };
8745        let mut __struct = Self::default();
8746        __struct.target_system = buf.get_u8();
8747        __struct.control_request = buf.get_u8();
8748        __struct.version = buf.get_u8();
8749        for v in &mut __struct.passkey {
8750            let val = buf.get_u8();
8751            *v = val;
8752        }
8753        Ok(__struct)
8754    }
8755    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8756        let mut __tmp = BytesMut::new(bytes);
8757        #[allow(clippy::absurd_extreme_comparisons)]
8758        #[allow(unused_comparisons)]
8759        if __tmp.remaining() < Self::ENCODED_LEN {
8760            panic!(
8761                "buffer is too small (need {} bytes, but got {})",
8762                Self::ENCODED_LEN,
8763                __tmp.remaining(),
8764            )
8765        }
8766        __tmp.put_u8(self.target_system);
8767        __tmp.put_u8(self.control_request);
8768        __tmp.put_u8(self.version);
8769        for val in &self.passkey {
8770            __tmp.put_u8(*val);
8771        }
8772        if matches!(version, MavlinkVersion::V2) {
8773            let len = __tmp.len();
8774            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8775        } else {
8776            __tmp.len()
8777        }
8778    }
8779}
8780#[doc = "Accept / deny control of this MAV."]
8781#[doc = ""]
8782#[doc = "ID: 6"]
8783#[derive(Debug, Clone, PartialEq)]
8784#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8785#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8786#[cfg_attr(feature = "ts", derive(TS))]
8787#[cfg_attr(feature = "ts", ts(export))]
8788pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
8789    #[doc = "ID of the GCS this message"]
8790    pub gcs_system_id: u8,
8791    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8792    pub control_request: u8,
8793    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
8794    pub ack: u8,
8795}
8796impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
8797    pub const ENCODED_LEN: usize = 3usize;
8798    pub const DEFAULT: Self = Self {
8799        gcs_system_id: 0_u8,
8800        control_request: 0_u8,
8801        ack: 0_u8,
8802    };
8803    #[cfg(feature = "arbitrary")]
8804    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8805        use arbitrary::{Arbitrary, Unstructured};
8806        let mut buf = [0u8; 1024];
8807        rng.fill_bytes(&mut buf);
8808        let mut unstructured = Unstructured::new(&buf);
8809        Self::arbitrary(&mut unstructured).unwrap_or_default()
8810    }
8811}
8812impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8813    fn default() -> Self {
8814        Self::DEFAULT.clone()
8815    }
8816}
8817impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8818    type Message = MavMessage;
8819    const ID: u32 = 6u32;
8820    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
8821    const EXTRA_CRC: u8 = 104u8;
8822    const ENCODED_LEN: usize = 3usize;
8823    fn deser(
8824        _version: MavlinkVersion,
8825        __input: &[u8],
8826    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8827        let avail_len = __input.len();
8828        let mut payload_buf = [0; Self::ENCODED_LEN];
8829        let mut buf = if avail_len < Self::ENCODED_LEN {
8830            payload_buf[0..avail_len].copy_from_slice(__input);
8831            Bytes::new(&payload_buf)
8832        } else {
8833            Bytes::new(__input)
8834        };
8835        let mut __struct = Self::default();
8836        __struct.gcs_system_id = buf.get_u8();
8837        __struct.control_request = buf.get_u8();
8838        __struct.ack = buf.get_u8();
8839        Ok(__struct)
8840    }
8841    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8842        let mut __tmp = BytesMut::new(bytes);
8843        #[allow(clippy::absurd_extreme_comparisons)]
8844        #[allow(unused_comparisons)]
8845        if __tmp.remaining() < Self::ENCODED_LEN {
8846            panic!(
8847                "buffer is too small (need {} bytes, but got {})",
8848                Self::ENCODED_LEN,
8849                __tmp.remaining(),
8850            )
8851        }
8852        __tmp.put_u8(self.gcs_system_id);
8853        __tmp.put_u8(self.control_request);
8854        __tmp.put_u8(self.ack);
8855        if matches!(version, MavlinkVersion::V2) {
8856            let len = __tmp.len();
8857            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8858        } else {
8859            __tmp.len()
8860        }
8861    }
8862}
8863#[doc = "Information about a potential collision."]
8864#[doc = ""]
8865#[doc = "ID: 247"]
8866#[derive(Debug, Clone, PartialEq)]
8867#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8868#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8869#[cfg_attr(feature = "ts", derive(TS))]
8870#[cfg_attr(feature = "ts", ts(export))]
8871pub struct COLLISION_DATA {
8872    #[doc = "Unique identifier, domain based on src field"]
8873    pub id: u32,
8874    #[doc = "Estimated time until collision occurs"]
8875    pub time_to_minimum_delta: f32,
8876    #[doc = "Closest vertical distance between vehicle and object"]
8877    pub altitude_minimum_delta: f32,
8878    #[doc = "Closest horizontal distance between vehicle and object"]
8879    pub horizontal_minimum_delta: f32,
8880    #[doc = "Collision data source"]
8881    pub src: MavCollisionSrc,
8882    #[doc = "Action that is being taken to avoid this collision"]
8883    pub action: MavCollisionAction,
8884    #[doc = "How concerned the aircraft is about this collision"]
8885    pub threat_level: MavCollisionThreatLevel,
8886}
8887impl COLLISION_DATA {
8888    pub const ENCODED_LEN: usize = 19usize;
8889    pub const DEFAULT: Self = Self {
8890        id: 0_u32,
8891        time_to_minimum_delta: 0.0_f32,
8892        altitude_minimum_delta: 0.0_f32,
8893        horizontal_minimum_delta: 0.0_f32,
8894        src: MavCollisionSrc::DEFAULT,
8895        action: MavCollisionAction::DEFAULT,
8896        threat_level: MavCollisionThreatLevel::DEFAULT,
8897    };
8898    #[cfg(feature = "arbitrary")]
8899    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8900        use arbitrary::{Arbitrary, Unstructured};
8901        let mut buf = [0u8; 1024];
8902        rng.fill_bytes(&mut buf);
8903        let mut unstructured = Unstructured::new(&buf);
8904        Self::arbitrary(&mut unstructured).unwrap_or_default()
8905    }
8906}
8907impl Default for COLLISION_DATA {
8908    fn default() -> Self {
8909        Self::DEFAULT.clone()
8910    }
8911}
8912impl MessageData for COLLISION_DATA {
8913    type Message = MavMessage;
8914    const ID: u32 = 247u32;
8915    const NAME: &'static str = "COLLISION";
8916    const EXTRA_CRC: u8 = 81u8;
8917    const ENCODED_LEN: usize = 19usize;
8918    fn deser(
8919        _version: MavlinkVersion,
8920        __input: &[u8],
8921    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8922        let avail_len = __input.len();
8923        let mut payload_buf = [0; Self::ENCODED_LEN];
8924        let mut buf = if avail_len < Self::ENCODED_LEN {
8925            payload_buf[0..avail_len].copy_from_slice(__input);
8926            Bytes::new(&payload_buf)
8927        } else {
8928            Bytes::new(__input)
8929        };
8930        let mut __struct = Self::default();
8931        __struct.id = buf.get_u32_le();
8932        __struct.time_to_minimum_delta = buf.get_f32_le();
8933        __struct.altitude_minimum_delta = buf.get_f32_le();
8934        __struct.horizontal_minimum_delta = buf.get_f32_le();
8935        let tmp = buf.get_u8();
8936        __struct.src =
8937            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8938                enum_type: "MavCollisionSrc",
8939                value: tmp as u32,
8940            })?;
8941        let tmp = buf.get_u8();
8942        __struct.action =
8943            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8944                enum_type: "MavCollisionAction",
8945                value: tmp as u32,
8946            })?;
8947        let tmp = buf.get_u8();
8948        __struct.threat_level =
8949            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8950                enum_type: "MavCollisionThreatLevel",
8951                value: tmp as u32,
8952            })?;
8953        Ok(__struct)
8954    }
8955    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8956        let mut __tmp = BytesMut::new(bytes);
8957        #[allow(clippy::absurd_extreme_comparisons)]
8958        #[allow(unused_comparisons)]
8959        if __tmp.remaining() < Self::ENCODED_LEN {
8960            panic!(
8961                "buffer is too small (need {} bytes, but got {})",
8962                Self::ENCODED_LEN,
8963                __tmp.remaining(),
8964            )
8965        }
8966        __tmp.put_u32_le(self.id);
8967        __tmp.put_f32_le(self.time_to_minimum_delta);
8968        __tmp.put_f32_le(self.altitude_minimum_delta);
8969        __tmp.put_f32_le(self.horizontal_minimum_delta);
8970        __tmp.put_u8(self.src as u8);
8971        __tmp.put_u8(self.action as u8);
8972        __tmp.put_u8(self.threat_level as u8);
8973        if matches!(version, MavlinkVersion::V2) {
8974            let len = __tmp.len();
8975            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8976        } else {
8977            __tmp.len()
8978        }
8979    }
8980}
8981#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8982#[doc = ""]
8983#[doc = "ID: 77"]
8984#[derive(Debug, Clone, PartialEq)]
8985#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8986#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8987#[cfg_attr(feature = "ts", derive(TS))]
8988#[cfg_attr(feature = "ts", ts(export))]
8989pub struct COMMAND_ACK_DATA {
8990    #[doc = "Command ID (of acknowledged command)."]
8991    pub command: MavCmd,
8992    #[doc = "Result of command."]
8993    pub result: MavResult,
8994    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
8995    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8996    pub progress: u8,
8997    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
8998    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8999    pub result_param2: i32,
9000    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9001    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9002    pub target_system: u8,
9003    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9004    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9005    pub target_component: u8,
9006}
9007impl COMMAND_ACK_DATA {
9008    pub const ENCODED_LEN: usize = 10usize;
9009    pub const DEFAULT: Self = Self {
9010        command: MavCmd::DEFAULT,
9011        result: MavResult::DEFAULT,
9012        progress: 0_u8,
9013        result_param2: 0_i32,
9014        target_system: 0_u8,
9015        target_component: 0_u8,
9016    };
9017    #[cfg(feature = "arbitrary")]
9018    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9019        use arbitrary::{Arbitrary, Unstructured};
9020        let mut buf = [0u8; 1024];
9021        rng.fill_bytes(&mut buf);
9022        let mut unstructured = Unstructured::new(&buf);
9023        Self::arbitrary(&mut unstructured).unwrap_or_default()
9024    }
9025}
9026impl Default for COMMAND_ACK_DATA {
9027    fn default() -> Self {
9028        Self::DEFAULT.clone()
9029    }
9030}
9031impl MessageData for COMMAND_ACK_DATA {
9032    type Message = MavMessage;
9033    const ID: u32 = 77u32;
9034    const NAME: &'static str = "COMMAND_ACK";
9035    const EXTRA_CRC: u8 = 143u8;
9036    const ENCODED_LEN: usize = 10usize;
9037    fn deser(
9038        _version: MavlinkVersion,
9039        __input: &[u8],
9040    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9041        let avail_len = __input.len();
9042        let mut payload_buf = [0; Self::ENCODED_LEN];
9043        let mut buf = if avail_len < Self::ENCODED_LEN {
9044            payload_buf[0..avail_len].copy_from_slice(__input);
9045            Bytes::new(&payload_buf)
9046        } else {
9047            Bytes::new(__input)
9048        };
9049        let mut __struct = Self::default();
9050        let tmp = buf.get_u16_le();
9051        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9052            ::mavlink_core::error::ParserError::InvalidEnum {
9053                enum_type: "MavCmd",
9054                value: tmp as u32,
9055            },
9056        )?;
9057        let tmp = buf.get_u8();
9058        __struct.result =
9059            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9060                enum_type: "MavResult",
9061                value: tmp as u32,
9062            })?;
9063        __struct.progress = buf.get_u8();
9064        __struct.result_param2 = buf.get_i32_le();
9065        __struct.target_system = buf.get_u8();
9066        __struct.target_component = buf.get_u8();
9067        Ok(__struct)
9068    }
9069    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9070        let mut __tmp = BytesMut::new(bytes);
9071        #[allow(clippy::absurd_extreme_comparisons)]
9072        #[allow(unused_comparisons)]
9073        if __tmp.remaining() < Self::ENCODED_LEN {
9074            panic!(
9075                "buffer is too small (need {} bytes, but got {})",
9076                Self::ENCODED_LEN,
9077                __tmp.remaining(),
9078            )
9079        }
9080        __tmp.put_u16_le(self.command as u16);
9081        __tmp.put_u8(self.result as u8);
9082        if matches!(version, MavlinkVersion::V2) {
9083            __tmp.put_u8(self.progress);
9084            __tmp.put_i32_le(self.result_param2);
9085            __tmp.put_u8(self.target_system);
9086            __tmp.put_u8(self.target_component);
9087            let len = __tmp.len();
9088            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9089        } else {
9090            __tmp.len()
9091        }
9092    }
9093}
9094#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9095#[doc = ""]
9096#[doc = "ID: 80"]
9097#[derive(Debug, Clone, PartialEq)]
9098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9099#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9100#[cfg_attr(feature = "ts", derive(TS))]
9101#[cfg_attr(feature = "ts", ts(export))]
9102pub struct COMMAND_CANCEL_DATA {
9103    #[doc = "Command ID (of command to cancel)."]
9104    pub command: MavCmd,
9105    #[doc = "System executing long running command. Should not be broadcast (0)."]
9106    pub target_system: u8,
9107    #[doc = "Component executing long running command."]
9108    pub target_component: u8,
9109}
9110impl COMMAND_CANCEL_DATA {
9111    pub const ENCODED_LEN: usize = 4usize;
9112    pub const DEFAULT: Self = Self {
9113        command: MavCmd::DEFAULT,
9114        target_system: 0_u8,
9115        target_component: 0_u8,
9116    };
9117    #[cfg(feature = "arbitrary")]
9118    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9119        use arbitrary::{Arbitrary, Unstructured};
9120        let mut buf = [0u8; 1024];
9121        rng.fill_bytes(&mut buf);
9122        let mut unstructured = Unstructured::new(&buf);
9123        Self::arbitrary(&mut unstructured).unwrap_or_default()
9124    }
9125}
9126impl Default for COMMAND_CANCEL_DATA {
9127    fn default() -> Self {
9128        Self::DEFAULT.clone()
9129    }
9130}
9131impl MessageData for COMMAND_CANCEL_DATA {
9132    type Message = MavMessage;
9133    const ID: u32 = 80u32;
9134    const NAME: &'static str = "COMMAND_CANCEL";
9135    const EXTRA_CRC: u8 = 14u8;
9136    const ENCODED_LEN: usize = 4usize;
9137    fn deser(
9138        _version: MavlinkVersion,
9139        __input: &[u8],
9140    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9141        let avail_len = __input.len();
9142        let mut payload_buf = [0; Self::ENCODED_LEN];
9143        let mut buf = if avail_len < Self::ENCODED_LEN {
9144            payload_buf[0..avail_len].copy_from_slice(__input);
9145            Bytes::new(&payload_buf)
9146        } else {
9147            Bytes::new(__input)
9148        };
9149        let mut __struct = Self::default();
9150        let tmp = buf.get_u16_le();
9151        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9152            ::mavlink_core::error::ParserError::InvalidEnum {
9153                enum_type: "MavCmd",
9154                value: tmp as u32,
9155            },
9156        )?;
9157        __struct.target_system = buf.get_u8();
9158        __struct.target_component = buf.get_u8();
9159        Ok(__struct)
9160    }
9161    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9162        let mut __tmp = BytesMut::new(bytes);
9163        #[allow(clippy::absurd_extreme_comparisons)]
9164        #[allow(unused_comparisons)]
9165        if __tmp.remaining() < Self::ENCODED_LEN {
9166            panic!(
9167                "buffer is too small (need {} bytes, but got {})",
9168                Self::ENCODED_LEN,
9169                __tmp.remaining(),
9170            )
9171        }
9172        __tmp.put_u16_le(self.command as u16);
9173        __tmp.put_u8(self.target_system);
9174        __tmp.put_u8(self.target_component);
9175        if matches!(version, MavlinkVersion::V2) {
9176            let len = __tmp.len();
9177            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9178        } else {
9179            __tmp.len()
9180        }
9181    }
9182}
9183#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9184#[doc = ""]
9185#[doc = "ID: 75"]
9186#[derive(Debug, Clone, PartialEq)]
9187#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9188#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9189#[cfg_attr(feature = "ts", derive(TS))]
9190#[cfg_attr(feature = "ts", ts(export))]
9191pub struct COMMAND_INT_DATA {
9192    #[doc = "PARAM1, see MAV_CMD enum"]
9193    pub param1: f32,
9194    #[doc = "PARAM2, see MAV_CMD enum"]
9195    pub param2: f32,
9196    #[doc = "PARAM3, see MAV_CMD enum"]
9197    pub param3: f32,
9198    #[doc = "PARAM4, see MAV_CMD enum"]
9199    pub param4: f32,
9200    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9201    pub x: i32,
9202    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9203    pub y: i32,
9204    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9205    pub z: f32,
9206    #[doc = "The scheduled action for the mission item."]
9207    pub command: MavCmd,
9208    #[doc = "System ID"]
9209    pub target_system: u8,
9210    #[doc = "Component ID"]
9211    pub target_component: u8,
9212    #[doc = "The coordinate system of the COMMAND."]
9213    pub frame: MavFrame,
9214    #[doc = "Not used."]
9215    pub current: u8,
9216    #[doc = "Not used (set 0)."]
9217    pub autocontinue: u8,
9218}
9219impl COMMAND_INT_DATA {
9220    pub const ENCODED_LEN: usize = 35usize;
9221    pub const DEFAULT: Self = Self {
9222        param1: 0.0_f32,
9223        param2: 0.0_f32,
9224        param3: 0.0_f32,
9225        param4: 0.0_f32,
9226        x: 0_i32,
9227        y: 0_i32,
9228        z: 0.0_f32,
9229        command: MavCmd::DEFAULT,
9230        target_system: 0_u8,
9231        target_component: 0_u8,
9232        frame: MavFrame::DEFAULT,
9233        current: 0_u8,
9234        autocontinue: 0_u8,
9235    };
9236    #[cfg(feature = "arbitrary")]
9237    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9238        use arbitrary::{Arbitrary, Unstructured};
9239        let mut buf = [0u8; 1024];
9240        rng.fill_bytes(&mut buf);
9241        let mut unstructured = Unstructured::new(&buf);
9242        Self::arbitrary(&mut unstructured).unwrap_or_default()
9243    }
9244}
9245impl Default for COMMAND_INT_DATA {
9246    fn default() -> Self {
9247        Self::DEFAULT.clone()
9248    }
9249}
9250impl MessageData for COMMAND_INT_DATA {
9251    type Message = MavMessage;
9252    const ID: u32 = 75u32;
9253    const NAME: &'static str = "COMMAND_INT";
9254    const EXTRA_CRC: u8 = 158u8;
9255    const ENCODED_LEN: usize = 35usize;
9256    fn deser(
9257        _version: MavlinkVersion,
9258        __input: &[u8],
9259    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9260        let avail_len = __input.len();
9261        let mut payload_buf = [0; Self::ENCODED_LEN];
9262        let mut buf = if avail_len < Self::ENCODED_LEN {
9263            payload_buf[0..avail_len].copy_from_slice(__input);
9264            Bytes::new(&payload_buf)
9265        } else {
9266            Bytes::new(__input)
9267        };
9268        let mut __struct = Self::default();
9269        __struct.param1 = buf.get_f32_le();
9270        __struct.param2 = buf.get_f32_le();
9271        __struct.param3 = buf.get_f32_le();
9272        __struct.param4 = buf.get_f32_le();
9273        __struct.x = buf.get_i32_le();
9274        __struct.y = buf.get_i32_le();
9275        __struct.z = buf.get_f32_le();
9276        let tmp = buf.get_u16_le();
9277        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9278            ::mavlink_core::error::ParserError::InvalidEnum {
9279                enum_type: "MavCmd",
9280                value: tmp as u32,
9281            },
9282        )?;
9283        __struct.target_system = buf.get_u8();
9284        __struct.target_component = buf.get_u8();
9285        let tmp = buf.get_u8();
9286        __struct.frame =
9287            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9288                enum_type: "MavFrame",
9289                value: tmp as u32,
9290            })?;
9291        __struct.current = buf.get_u8();
9292        __struct.autocontinue = buf.get_u8();
9293        Ok(__struct)
9294    }
9295    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9296        let mut __tmp = BytesMut::new(bytes);
9297        #[allow(clippy::absurd_extreme_comparisons)]
9298        #[allow(unused_comparisons)]
9299        if __tmp.remaining() < Self::ENCODED_LEN {
9300            panic!(
9301                "buffer is too small (need {} bytes, but got {})",
9302                Self::ENCODED_LEN,
9303                __tmp.remaining(),
9304            )
9305        }
9306        __tmp.put_f32_le(self.param1);
9307        __tmp.put_f32_le(self.param2);
9308        __tmp.put_f32_le(self.param3);
9309        __tmp.put_f32_le(self.param4);
9310        __tmp.put_i32_le(self.x);
9311        __tmp.put_i32_le(self.y);
9312        __tmp.put_f32_le(self.z);
9313        __tmp.put_u16_le(self.command as u16);
9314        __tmp.put_u8(self.target_system);
9315        __tmp.put_u8(self.target_component);
9316        __tmp.put_u8(self.frame as u8);
9317        __tmp.put_u8(self.current);
9318        __tmp.put_u8(self.autocontinue);
9319        if matches!(version, MavlinkVersion::V2) {
9320            let len = __tmp.len();
9321            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9322        } else {
9323            __tmp.len()
9324        }
9325    }
9326}
9327#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9328#[doc = ""]
9329#[doc = "ID: 76"]
9330#[derive(Debug, Clone, PartialEq)]
9331#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9332#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9333#[cfg_attr(feature = "ts", derive(TS))]
9334#[cfg_attr(feature = "ts", ts(export))]
9335pub struct COMMAND_LONG_DATA {
9336    #[doc = "Parameter 1 (for the specific command)."]
9337    pub param1: f32,
9338    #[doc = "Parameter 2 (for the specific command)."]
9339    pub param2: f32,
9340    #[doc = "Parameter 3 (for the specific command)."]
9341    pub param3: f32,
9342    #[doc = "Parameter 4 (for the specific command)."]
9343    pub param4: f32,
9344    #[doc = "Parameter 5 (for the specific command)."]
9345    pub param5: f32,
9346    #[doc = "Parameter 6 (for the specific command)."]
9347    pub param6: f32,
9348    #[doc = "Parameter 7 (for the specific command)."]
9349    pub param7: f32,
9350    #[doc = "Command ID (of command to send)."]
9351    pub command: MavCmd,
9352    #[doc = "System which should execute the command"]
9353    pub target_system: u8,
9354    #[doc = "Component which should execute the command, 0 for all components"]
9355    pub target_component: u8,
9356    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9357    pub confirmation: u8,
9358}
9359impl COMMAND_LONG_DATA {
9360    pub const ENCODED_LEN: usize = 33usize;
9361    pub const DEFAULT: Self = Self {
9362        param1: 0.0_f32,
9363        param2: 0.0_f32,
9364        param3: 0.0_f32,
9365        param4: 0.0_f32,
9366        param5: 0.0_f32,
9367        param6: 0.0_f32,
9368        param7: 0.0_f32,
9369        command: MavCmd::DEFAULT,
9370        target_system: 0_u8,
9371        target_component: 0_u8,
9372        confirmation: 0_u8,
9373    };
9374    #[cfg(feature = "arbitrary")]
9375    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9376        use arbitrary::{Arbitrary, Unstructured};
9377        let mut buf = [0u8; 1024];
9378        rng.fill_bytes(&mut buf);
9379        let mut unstructured = Unstructured::new(&buf);
9380        Self::arbitrary(&mut unstructured).unwrap_or_default()
9381    }
9382}
9383impl Default for COMMAND_LONG_DATA {
9384    fn default() -> Self {
9385        Self::DEFAULT.clone()
9386    }
9387}
9388impl MessageData for COMMAND_LONG_DATA {
9389    type Message = MavMessage;
9390    const ID: u32 = 76u32;
9391    const NAME: &'static str = "COMMAND_LONG";
9392    const EXTRA_CRC: u8 = 152u8;
9393    const ENCODED_LEN: usize = 33usize;
9394    fn deser(
9395        _version: MavlinkVersion,
9396        __input: &[u8],
9397    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9398        let avail_len = __input.len();
9399        let mut payload_buf = [0; Self::ENCODED_LEN];
9400        let mut buf = if avail_len < Self::ENCODED_LEN {
9401            payload_buf[0..avail_len].copy_from_slice(__input);
9402            Bytes::new(&payload_buf)
9403        } else {
9404            Bytes::new(__input)
9405        };
9406        let mut __struct = Self::default();
9407        __struct.param1 = buf.get_f32_le();
9408        __struct.param2 = buf.get_f32_le();
9409        __struct.param3 = buf.get_f32_le();
9410        __struct.param4 = buf.get_f32_le();
9411        __struct.param5 = buf.get_f32_le();
9412        __struct.param6 = buf.get_f32_le();
9413        __struct.param7 = buf.get_f32_le();
9414        let tmp = buf.get_u16_le();
9415        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9416            ::mavlink_core::error::ParserError::InvalidEnum {
9417                enum_type: "MavCmd",
9418                value: tmp as u32,
9419            },
9420        )?;
9421        __struct.target_system = buf.get_u8();
9422        __struct.target_component = buf.get_u8();
9423        __struct.confirmation = buf.get_u8();
9424        Ok(__struct)
9425    }
9426    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9427        let mut __tmp = BytesMut::new(bytes);
9428        #[allow(clippy::absurd_extreme_comparisons)]
9429        #[allow(unused_comparisons)]
9430        if __tmp.remaining() < Self::ENCODED_LEN {
9431            panic!(
9432                "buffer is too small (need {} bytes, but got {})",
9433                Self::ENCODED_LEN,
9434                __tmp.remaining(),
9435            )
9436        }
9437        __tmp.put_f32_le(self.param1);
9438        __tmp.put_f32_le(self.param2);
9439        __tmp.put_f32_le(self.param3);
9440        __tmp.put_f32_le(self.param4);
9441        __tmp.put_f32_le(self.param5);
9442        __tmp.put_f32_le(self.param6);
9443        __tmp.put_f32_le(self.param7);
9444        __tmp.put_u16_le(self.command as u16);
9445        __tmp.put_u8(self.target_system);
9446        __tmp.put_u8(self.target_component);
9447        __tmp.put_u8(self.confirmation);
9448        if matches!(version, MavlinkVersion::V2) {
9449            let len = __tmp.len();
9450            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9451        } else {
9452            __tmp.len()
9453        }
9454    }
9455}
9456#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9457#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9458#[doc = ""]
9459#[doc = "ID: 395"]
9460#[derive(Debug, Clone, PartialEq)]
9461#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9462#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9463#[cfg_attr(feature = "ts", derive(TS))]
9464#[cfg_attr(feature = "ts", ts(export))]
9465pub struct COMPONENT_INFORMATION_DATA {
9466    #[doc = "Timestamp (time since system boot)."]
9467    pub time_boot_ms: u32,
9468    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9469    pub general_metadata_file_crc: u32,
9470    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9471    pub peripherals_metadata_file_crc: u32,
9472    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9473    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9474    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9475    pub general_metadata_uri: [u8; 100],
9476    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9477    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9478    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9479    pub peripherals_metadata_uri: [u8; 100],
9480}
9481impl COMPONENT_INFORMATION_DATA {
9482    pub const ENCODED_LEN: usize = 212usize;
9483    pub const DEFAULT: Self = Self {
9484        time_boot_ms: 0_u32,
9485        general_metadata_file_crc: 0_u32,
9486        peripherals_metadata_file_crc: 0_u32,
9487        general_metadata_uri: [0_u8; 100usize],
9488        peripherals_metadata_uri: [0_u8; 100usize],
9489    };
9490    #[cfg(feature = "arbitrary")]
9491    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9492        use arbitrary::{Arbitrary, Unstructured};
9493        let mut buf = [0u8; 1024];
9494        rng.fill_bytes(&mut buf);
9495        let mut unstructured = Unstructured::new(&buf);
9496        Self::arbitrary(&mut unstructured).unwrap_or_default()
9497    }
9498}
9499impl Default for COMPONENT_INFORMATION_DATA {
9500    fn default() -> Self {
9501        Self::DEFAULT.clone()
9502    }
9503}
9504impl MessageData for COMPONENT_INFORMATION_DATA {
9505    type Message = MavMessage;
9506    const ID: u32 = 395u32;
9507    const NAME: &'static str = "COMPONENT_INFORMATION";
9508    const EXTRA_CRC: u8 = 0u8;
9509    const ENCODED_LEN: usize = 212usize;
9510    fn deser(
9511        _version: MavlinkVersion,
9512        __input: &[u8],
9513    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9514        let avail_len = __input.len();
9515        let mut payload_buf = [0; Self::ENCODED_LEN];
9516        let mut buf = if avail_len < Self::ENCODED_LEN {
9517            payload_buf[0..avail_len].copy_from_slice(__input);
9518            Bytes::new(&payload_buf)
9519        } else {
9520            Bytes::new(__input)
9521        };
9522        let mut __struct = Self::default();
9523        __struct.time_boot_ms = buf.get_u32_le();
9524        __struct.general_metadata_file_crc = buf.get_u32_le();
9525        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
9526        for v in &mut __struct.general_metadata_uri {
9527            let val = buf.get_u8();
9528            *v = val;
9529        }
9530        for v in &mut __struct.peripherals_metadata_uri {
9531            let val = buf.get_u8();
9532            *v = val;
9533        }
9534        Ok(__struct)
9535    }
9536    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9537        let mut __tmp = BytesMut::new(bytes);
9538        #[allow(clippy::absurd_extreme_comparisons)]
9539        #[allow(unused_comparisons)]
9540        if __tmp.remaining() < Self::ENCODED_LEN {
9541            panic!(
9542                "buffer is too small (need {} bytes, but got {})",
9543                Self::ENCODED_LEN,
9544                __tmp.remaining(),
9545            )
9546        }
9547        __tmp.put_u32_le(self.time_boot_ms);
9548        __tmp.put_u32_le(self.general_metadata_file_crc);
9549        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9550        for val in &self.general_metadata_uri {
9551            __tmp.put_u8(*val);
9552        }
9553        for val in &self.peripherals_metadata_uri {
9554            __tmp.put_u8(*val);
9555        }
9556        if matches!(version, MavlinkVersion::V2) {
9557            let len = __tmp.len();
9558            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9559        } else {
9560            __tmp.len()
9561        }
9562    }
9563}
9564#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
9565#[doc = ""]
9566#[doc = "ID: 396"]
9567#[derive(Debug, Clone, PartialEq)]
9568#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9569#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9570#[cfg_attr(feature = "ts", derive(TS))]
9571#[cfg_attr(feature = "ts", ts(export))]
9572pub struct COMPONENT_INFORMATION_BASIC_DATA {
9573    #[doc = "Component capability flags"]
9574    pub capabilities: MavProtocolCapability,
9575    #[doc = "Timestamp (time since system boot)."]
9576    pub time_boot_ms: u32,
9577    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
9578    pub time_manufacture_s: u32,
9579    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9580    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9581    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9582    pub vendor_name: [u8; 32],
9583    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9584    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9585    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9586    pub model_name: [u8; 32],
9587    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9588    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9589    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9590    pub software_version: [u8; 24],
9591    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9592    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9593    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9594    pub hardware_version: [u8; 24],
9595    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9596    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9597    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9598    pub serial_number: [u8; 32],
9599}
9600impl COMPONENT_INFORMATION_BASIC_DATA {
9601    pub const ENCODED_LEN: usize = 160usize;
9602    pub const DEFAULT: Self = Self {
9603        capabilities: MavProtocolCapability::DEFAULT,
9604        time_boot_ms: 0_u32,
9605        time_manufacture_s: 0_u32,
9606        vendor_name: [0_u8; 32usize],
9607        model_name: [0_u8; 32usize],
9608        software_version: [0_u8; 24usize],
9609        hardware_version: [0_u8; 24usize],
9610        serial_number: [0_u8; 32usize],
9611    };
9612    #[cfg(feature = "arbitrary")]
9613    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9614        use arbitrary::{Arbitrary, Unstructured};
9615        let mut buf = [0u8; 1024];
9616        rng.fill_bytes(&mut buf);
9617        let mut unstructured = Unstructured::new(&buf);
9618        Self::arbitrary(&mut unstructured).unwrap_or_default()
9619    }
9620}
9621impl Default for COMPONENT_INFORMATION_BASIC_DATA {
9622    fn default() -> Self {
9623        Self::DEFAULT.clone()
9624    }
9625}
9626impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
9627    type Message = MavMessage;
9628    const ID: u32 = 396u32;
9629    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
9630    const EXTRA_CRC: u8 = 50u8;
9631    const ENCODED_LEN: usize = 160usize;
9632    fn deser(
9633        _version: MavlinkVersion,
9634        __input: &[u8],
9635    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9636        let avail_len = __input.len();
9637        let mut payload_buf = [0; Self::ENCODED_LEN];
9638        let mut buf = if avail_len < Self::ENCODED_LEN {
9639            payload_buf[0..avail_len].copy_from_slice(__input);
9640            Bytes::new(&payload_buf)
9641        } else {
9642            Bytes::new(__input)
9643        };
9644        let mut __struct = Self::default();
9645        let tmp = buf.get_u64_le();
9646        __struct.capabilities = MavProtocolCapability::from_bits(
9647            tmp & MavProtocolCapability::all().bits(),
9648        )
9649        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9650            flag_type: "MavProtocolCapability",
9651            value: tmp as u32,
9652        })?;
9653        __struct.time_boot_ms = buf.get_u32_le();
9654        __struct.time_manufacture_s = buf.get_u32_le();
9655        for v in &mut __struct.vendor_name {
9656            let val = buf.get_u8();
9657            *v = val;
9658        }
9659        for v in &mut __struct.model_name {
9660            let val = buf.get_u8();
9661            *v = val;
9662        }
9663        for v in &mut __struct.software_version {
9664            let val = buf.get_u8();
9665            *v = val;
9666        }
9667        for v in &mut __struct.hardware_version {
9668            let val = buf.get_u8();
9669            *v = val;
9670        }
9671        for v in &mut __struct.serial_number {
9672            let val = buf.get_u8();
9673            *v = val;
9674        }
9675        Ok(__struct)
9676    }
9677    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9678        let mut __tmp = BytesMut::new(bytes);
9679        #[allow(clippy::absurd_extreme_comparisons)]
9680        #[allow(unused_comparisons)]
9681        if __tmp.remaining() < Self::ENCODED_LEN {
9682            panic!(
9683                "buffer is too small (need {} bytes, but got {})",
9684                Self::ENCODED_LEN,
9685                __tmp.remaining(),
9686            )
9687        }
9688        __tmp.put_u64_le(self.capabilities.bits());
9689        __tmp.put_u32_le(self.time_boot_ms);
9690        __tmp.put_u32_le(self.time_manufacture_s);
9691        for val in &self.vendor_name {
9692            __tmp.put_u8(*val);
9693        }
9694        for val in &self.model_name {
9695            __tmp.put_u8(*val);
9696        }
9697        for val in &self.software_version {
9698            __tmp.put_u8(*val);
9699        }
9700        for val in &self.hardware_version {
9701            __tmp.put_u8(*val);
9702        }
9703        for val in &self.serial_number {
9704            __tmp.put_u8(*val);
9705        }
9706        if matches!(version, MavlinkVersion::V2) {
9707            let len = __tmp.len();
9708            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9709        } else {
9710            __tmp.len()
9711        }
9712    }
9713}
9714#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
9715#[doc = ""]
9716#[doc = "ID: 397"]
9717#[derive(Debug, Clone, PartialEq)]
9718#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9719#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9720#[cfg_attr(feature = "ts", derive(TS))]
9721#[cfg_attr(feature = "ts", ts(export))]
9722pub struct COMPONENT_METADATA_DATA {
9723    #[doc = "Timestamp (time since system boot)."]
9724    pub time_boot_ms: u32,
9725    #[doc = "CRC32 of the general metadata file."]
9726    pub file_crc: u32,
9727    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9728    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9729    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9730    pub uri: [u8; 100],
9731}
9732impl COMPONENT_METADATA_DATA {
9733    pub const ENCODED_LEN: usize = 108usize;
9734    pub const DEFAULT: Self = Self {
9735        time_boot_ms: 0_u32,
9736        file_crc: 0_u32,
9737        uri: [0_u8; 100usize],
9738    };
9739    #[cfg(feature = "arbitrary")]
9740    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9741        use arbitrary::{Arbitrary, Unstructured};
9742        let mut buf = [0u8; 1024];
9743        rng.fill_bytes(&mut buf);
9744        let mut unstructured = Unstructured::new(&buf);
9745        Self::arbitrary(&mut unstructured).unwrap_or_default()
9746    }
9747}
9748impl Default for COMPONENT_METADATA_DATA {
9749    fn default() -> Self {
9750        Self::DEFAULT.clone()
9751    }
9752}
9753impl MessageData for COMPONENT_METADATA_DATA {
9754    type Message = MavMessage;
9755    const ID: u32 = 397u32;
9756    const NAME: &'static str = "COMPONENT_METADATA";
9757    const EXTRA_CRC: u8 = 182u8;
9758    const ENCODED_LEN: usize = 108usize;
9759    fn deser(
9760        _version: MavlinkVersion,
9761        __input: &[u8],
9762    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9763        let avail_len = __input.len();
9764        let mut payload_buf = [0; Self::ENCODED_LEN];
9765        let mut buf = if avail_len < Self::ENCODED_LEN {
9766            payload_buf[0..avail_len].copy_from_slice(__input);
9767            Bytes::new(&payload_buf)
9768        } else {
9769            Bytes::new(__input)
9770        };
9771        let mut __struct = Self::default();
9772        __struct.time_boot_ms = buf.get_u32_le();
9773        __struct.file_crc = buf.get_u32_le();
9774        for v in &mut __struct.uri {
9775            let val = buf.get_u8();
9776            *v = val;
9777        }
9778        Ok(__struct)
9779    }
9780    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9781        let mut __tmp = BytesMut::new(bytes);
9782        #[allow(clippy::absurd_extreme_comparisons)]
9783        #[allow(unused_comparisons)]
9784        if __tmp.remaining() < Self::ENCODED_LEN {
9785            panic!(
9786                "buffer is too small (need {} bytes, but got {})",
9787                Self::ENCODED_LEN,
9788                __tmp.remaining(),
9789            )
9790        }
9791        __tmp.put_u32_le(self.time_boot_ms);
9792        __tmp.put_u32_le(self.file_crc);
9793        for val in &self.uri {
9794            __tmp.put_u8(*val);
9795        }
9796        if matches!(version, MavlinkVersion::V2) {
9797            let len = __tmp.len();
9798            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9799        } else {
9800            __tmp.len()
9801        }
9802    }
9803}
9804#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
9805#[doc = ""]
9806#[doc = "ID: 146"]
9807#[derive(Debug, Clone, PartialEq)]
9808#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9809#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9810#[cfg_attr(feature = "ts", derive(TS))]
9811#[cfg_attr(feature = "ts", ts(export))]
9812pub struct CONTROL_SYSTEM_STATE_DATA {
9813    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9814    pub time_usec: u64,
9815    #[doc = "X acceleration in body frame"]
9816    pub x_acc: f32,
9817    #[doc = "Y acceleration in body frame"]
9818    pub y_acc: f32,
9819    #[doc = "Z acceleration in body frame"]
9820    pub z_acc: f32,
9821    #[doc = "X velocity in body frame"]
9822    pub x_vel: f32,
9823    #[doc = "Y velocity in body frame"]
9824    pub y_vel: f32,
9825    #[doc = "Z velocity in body frame"]
9826    pub z_vel: f32,
9827    #[doc = "X position in local frame"]
9828    pub x_pos: f32,
9829    #[doc = "Y position in local frame"]
9830    pub y_pos: f32,
9831    #[doc = "Z position in local frame"]
9832    pub z_pos: f32,
9833    #[doc = "Airspeed, set to -1 if unknown"]
9834    pub airspeed: f32,
9835    #[doc = "Variance of body velocity estimate"]
9836    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9837    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9838    pub vel_variance: [f32; 3],
9839    #[doc = "Variance in local position"]
9840    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9841    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9842    pub pos_variance: [f32; 3],
9843    #[doc = "The attitude, represented as Quaternion"]
9844    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9845    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9846    pub q: [f32; 4],
9847    #[doc = "Angular rate in roll axis"]
9848    pub roll_rate: f32,
9849    #[doc = "Angular rate in pitch axis"]
9850    pub pitch_rate: f32,
9851    #[doc = "Angular rate in yaw axis"]
9852    pub yaw_rate: f32,
9853}
9854impl CONTROL_SYSTEM_STATE_DATA {
9855    pub const ENCODED_LEN: usize = 100usize;
9856    pub const DEFAULT: Self = Self {
9857        time_usec: 0_u64,
9858        x_acc: 0.0_f32,
9859        y_acc: 0.0_f32,
9860        z_acc: 0.0_f32,
9861        x_vel: 0.0_f32,
9862        y_vel: 0.0_f32,
9863        z_vel: 0.0_f32,
9864        x_pos: 0.0_f32,
9865        y_pos: 0.0_f32,
9866        z_pos: 0.0_f32,
9867        airspeed: 0.0_f32,
9868        vel_variance: [0.0_f32; 3usize],
9869        pos_variance: [0.0_f32; 3usize],
9870        q: [0.0_f32; 4usize],
9871        roll_rate: 0.0_f32,
9872        pitch_rate: 0.0_f32,
9873        yaw_rate: 0.0_f32,
9874    };
9875    #[cfg(feature = "arbitrary")]
9876    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9877        use arbitrary::{Arbitrary, Unstructured};
9878        let mut buf = [0u8; 1024];
9879        rng.fill_bytes(&mut buf);
9880        let mut unstructured = Unstructured::new(&buf);
9881        Self::arbitrary(&mut unstructured).unwrap_or_default()
9882    }
9883}
9884impl Default for CONTROL_SYSTEM_STATE_DATA {
9885    fn default() -> Self {
9886        Self::DEFAULT.clone()
9887    }
9888}
9889impl MessageData for CONTROL_SYSTEM_STATE_DATA {
9890    type Message = MavMessage;
9891    const ID: u32 = 146u32;
9892    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
9893    const EXTRA_CRC: u8 = 103u8;
9894    const ENCODED_LEN: usize = 100usize;
9895    fn deser(
9896        _version: MavlinkVersion,
9897        __input: &[u8],
9898    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9899        let avail_len = __input.len();
9900        let mut payload_buf = [0; Self::ENCODED_LEN];
9901        let mut buf = if avail_len < Self::ENCODED_LEN {
9902            payload_buf[0..avail_len].copy_from_slice(__input);
9903            Bytes::new(&payload_buf)
9904        } else {
9905            Bytes::new(__input)
9906        };
9907        let mut __struct = Self::default();
9908        __struct.time_usec = buf.get_u64_le();
9909        __struct.x_acc = buf.get_f32_le();
9910        __struct.y_acc = buf.get_f32_le();
9911        __struct.z_acc = buf.get_f32_le();
9912        __struct.x_vel = buf.get_f32_le();
9913        __struct.y_vel = buf.get_f32_le();
9914        __struct.z_vel = buf.get_f32_le();
9915        __struct.x_pos = buf.get_f32_le();
9916        __struct.y_pos = buf.get_f32_le();
9917        __struct.z_pos = buf.get_f32_le();
9918        __struct.airspeed = buf.get_f32_le();
9919        for v in &mut __struct.vel_variance {
9920            let val = buf.get_f32_le();
9921            *v = val;
9922        }
9923        for v in &mut __struct.pos_variance {
9924            let val = buf.get_f32_le();
9925            *v = val;
9926        }
9927        for v in &mut __struct.q {
9928            let val = buf.get_f32_le();
9929            *v = val;
9930        }
9931        __struct.roll_rate = buf.get_f32_le();
9932        __struct.pitch_rate = buf.get_f32_le();
9933        __struct.yaw_rate = buf.get_f32_le();
9934        Ok(__struct)
9935    }
9936    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9937        let mut __tmp = BytesMut::new(bytes);
9938        #[allow(clippy::absurd_extreme_comparisons)]
9939        #[allow(unused_comparisons)]
9940        if __tmp.remaining() < Self::ENCODED_LEN {
9941            panic!(
9942                "buffer is too small (need {} bytes, but got {})",
9943                Self::ENCODED_LEN,
9944                __tmp.remaining(),
9945            )
9946        }
9947        __tmp.put_u64_le(self.time_usec);
9948        __tmp.put_f32_le(self.x_acc);
9949        __tmp.put_f32_le(self.y_acc);
9950        __tmp.put_f32_le(self.z_acc);
9951        __tmp.put_f32_le(self.x_vel);
9952        __tmp.put_f32_le(self.y_vel);
9953        __tmp.put_f32_le(self.z_vel);
9954        __tmp.put_f32_le(self.x_pos);
9955        __tmp.put_f32_le(self.y_pos);
9956        __tmp.put_f32_le(self.z_pos);
9957        __tmp.put_f32_le(self.airspeed);
9958        for val in &self.vel_variance {
9959            __tmp.put_f32_le(*val);
9960        }
9961        for val in &self.pos_variance {
9962            __tmp.put_f32_le(*val);
9963        }
9964        for val in &self.q {
9965            __tmp.put_f32_le(*val);
9966        }
9967        __tmp.put_f32_le(self.roll_rate);
9968        __tmp.put_f32_le(self.pitch_rate);
9969        __tmp.put_f32_le(self.yaw_rate);
9970        if matches!(version, MavlinkVersion::V2) {
9971            let len = __tmp.len();
9972            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9973        } else {
9974            __tmp.len()
9975        }
9976    }
9977}
9978#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
9979#[doc = ""]
9980#[doc = "ID: 411"]
9981#[derive(Debug, Clone, PartialEq)]
9982#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9983#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9984#[cfg_attr(feature = "ts", derive(TS))]
9985#[cfg_attr(feature = "ts", ts(export))]
9986pub struct CURRENT_EVENT_SEQUENCE_DATA {
9987    #[doc = "Sequence number."]
9988    pub sequence: u16,
9989    #[doc = "Flag bitset."]
9990    pub flags: MavEventCurrentSequenceFlags,
9991}
9992impl CURRENT_EVENT_SEQUENCE_DATA {
9993    pub const ENCODED_LEN: usize = 3usize;
9994    pub const DEFAULT: Self = Self {
9995        sequence: 0_u16,
9996        flags: MavEventCurrentSequenceFlags::DEFAULT,
9997    };
9998    #[cfg(feature = "arbitrary")]
9999    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10000        use arbitrary::{Arbitrary, Unstructured};
10001        let mut buf = [0u8; 1024];
10002        rng.fill_bytes(&mut buf);
10003        let mut unstructured = Unstructured::new(&buf);
10004        Self::arbitrary(&mut unstructured).unwrap_or_default()
10005    }
10006}
10007impl Default for CURRENT_EVENT_SEQUENCE_DATA {
10008    fn default() -> Self {
10009        Self::DEFAULT.clone()
10010    }
10011}
10012impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
10013    type Message = MavMessage;
10014    const ID: u32 = 411u32;
10015    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
10016    const EXTRA_CRC: u8 = 106u8;
10017    const ENCODED_LEN: usize = 3usize;
10018    fn deser(
10019        _version: MavlinkVersion,
10020        __input: &[u8],
10021    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10022        let avail_len = __input.len();
10023        let mut payload_buf = [0; Self::ENCODED_LEN];
10024        let mut buf = if avail_len < Self::ENCODED_LEN {
10025            payload_buf[0..avail_len].copy_from_slice(__input);
10026            Bytes::new(&payload_buf)
10027        } else {
10028            Bytes::new(__input)
10029        };
10030        let mut __struct = Self::default();
10031        __struct.sequence = buf.get_u16_le();
10032        let tmp = buf.get_u8();
10033        __struct.flags =
10034            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10035                enum_type: "MavEventCurrentSequenceFlags",
10036                value: tmp as u32,
10037            })?;
10038        Ok(__struct)
10039    }
10040    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10041        let mut __tmp = BytesMut::new(bytes);
10042        #[allow(clippy::absurd_extreme_comparisons)]
10043        #[allow(unused_comparisons)]
10044        if __tmp.remaining() < Self::ENCODED_LEN {
10045            panic!(
10046                "buffer is too small (need {} bytes, but got {})",
10047                Self::ENCODED_LEN,
10048                __tmp.remaining(),
10049            )
10050        }
10051        __tmp.put_u16_le(self.sequence);
10052        __tmp.put_u8(self.flags as u8);
10053        if matches!(version, MavlinkVersion::V2) {
10054            let len = __tmp.len();
10055            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10056        } else {
10057            __tmp.len()
10058        }
10059    }
10060}
10061#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
10062#[doc = ""]
10063#[doc = "ID: 436"]
10064#[derive(Debug, Clone, PartialEq)]
10065#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10066#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10067#[cfg_attr(feature = "ts", derive(TS))]
10068#[cfg_attr(feature = "ts", ts(export))]
10069pub struct CURRENT_MODE_DATA {
10070    #[doc = "A bitfield for use for autopilot-specific flags"]
10071    pub custom_mode: u32,
10072    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10073    pub intended_custom_mode: u32,
10074    #[doc = "Standard mode."]
10075    pub standard_mode: MavStandardMode,
10076}
10077impl CURRENT_MODE_DATA {
10078    pub const ENCODED_LEN: usize = 9usize;
10079    pub const DEFAULT: Self = Self {
10080        custom_mode: 0_u32,
10081        intended_custom_mode: 0_u32,
10082        standard_mode: MavStandardMode::DEFAULT,
10083    };
10084    #[cfg(feature = "arbitrary")]
10085    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10086        use arbitrary::{Arbitrary, Unstructured};
10087        let mut buf = [0u8; 1024];
10088        rng.fill_bytes(&mut buf);
10089        let mut unstructured = Unstructured::new(&buf);
10090        Self::arbitrary(&mut unstructured).unwrap_or_default()
10091    }
10092}
10093impl Default for CURRENT_MODE_DATA {
10094    fn default() -> Self {
10095        Self::DEFAULT.clone()
10096    }
10097}
10098impl MessageData for CURRENT_MODE_DATA {
10099    type Message = MavMessage;
10100    const ID: u32 = 436u32;
10101    const NAME: &'static str = "CURRENT_MODE";
10102    const EXTRA_CRC: u8 = 193u8;
10103    const ENCODED_LEN: usize = 9usize;
10104    fn deser(
10105        _version: MavlinkVersion,
10106        __input: &[u8],
10107    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10108        let avail_len = __input.len();
10109        let mut payload_buf = [0; Self::ENCODED_LEN];
10110        let mut buf = if avail_len < Self::ENCODED_LEN {
10111            payload_buf[0..avail_len].copy_from_slice(__input);
10112            Bytes::new(&payload_buf)
10113        } else {
10114            Bytes::new(__input)
10115        };
10116        let mut __struct = Self::default();
10117        __struct.custom_mode = buf.get_u32_le();
10118        __struct.intended_custom_mode = buf.get_u32_le();
10119        let tmp = buf.get_u8();
10120        __struct.standard_mode =
10121            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10122                enum_type: "MavStandardMode",
10123                value: tmp as u32,
10124            })?;
10125        Ok(__struct)
10126    }
10127    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10128        let mut __tmp = BytesMut::new(bytes);
10129        #[allow(clippy::absurd_extreme_comparisons)]
10130        #[allow(unused_comparisons)]
10131        if __tmp.remaining() < Self::ENCODED_LEN {
10132            panic!(
10133                "buffer is too small (need {} bytes, but got {})",
10134                Self::ENCODED_LEN,
10135                __tmp.remaining(),
10136            )
10137        }
10138        __tmp.put_u32_le(self.custom_mode);
10139        __tmp.put_u32_le(self.intended_custom_mode);
10140        __tmp.put_u8(self.standard_mode as u8);
10141        if matches!(version, MavlinkVersion::V2) {
10142            let len = __tmp.len();
10143            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10144        } else {
10145            __tmp.len()
10146        }
10147    }
10148}
10149#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10150#[doc = "Data stream status information."]
10151#[doc = ""]
10152#[doc = "ID: 67"]
10153#[derive(Debug, Clone, PartialEq)]
10154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10155#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10156#[cfg_attr(feature = "ts", derive(TS))]
10157#[cfg_attr(feature = "ts", ts(export))]
10158pub struct DATA_STREAM_DATA {
10159    #[doc = "The message rate"]
10160    pub message_rate: u16,
10161    #[doc = "The ID of the requested data stream"]
10162    pub stream_id: u8,
10163    #[doc = "1 stream is enabled, 0 stream is stopped."]
10164    pub on_off: u8,
10165}
10166impl DATA_STREAM_DATA {
10167    pub const ENCODED_LEN: usize = 4usize;
10168    pub const DEFAULT: Self = Self {
10169        message_rate: 0_u16,
10170        stream_id: 0_u8,
10171        on_off: 0_u8,
10172    };
10173    #[cfg(feature = "arbitrary")]
10174    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10175        use arbitrary::{Arbitrary, Unstructured};
10176        let mut buf = [0u8; 1024];
10177        rng.fill_bytes(&mut buf);
10178        let mut unstructured = Unstructured::new(&buf);
10179        Self::arbitrary(&mut unstructured).unwrap_or_default()
10180    }
10181}
10182impl Default for DATA_STREAM_DATA {
10183    fn default() -> Self {
10184        Self::DEFAULT.clone()
10185    }
10186}
10187impl MessageData for DATA_STREAM_DATA {
10188    type Message = MavMessage;
10189    const ID: u32 = 67u32;
10190    const NAME: &'static str = "DATA_STREAM";
10191    const EXTRA_CRC: u8 = 21u8;
10192    const ENCODED_LEN: usize = 4usize;
10193    fn deser(
10194        _version: MavlinkVersion,
10195        __input: &[u8],
10196    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10197        let avail_len = __input.len();
10198        let mut payload_buf = [0; Self::ENCODED_LEN];
10199        let mut buf = if avail_len < Self::ENCODED_LEN {
10200            payload_buf[0..avail_len].copy_from_slice(__input);
10201            Bytes::new(&payload_buf)
10202        } else {
10203            Bytes::new(__input)
10204        };
10205        let mut __struct = Self::default();
10206        __struct.message_rate = buf.get_u16_le();
10207        __struct.stream_id = buf.get_u8();
10208        __struct.on_off = buf.get_u8();
10209        Ok(__struct)
10210    }
10211    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10212        let mut __tmp = BytesMut::new(bytes);
10213        #[allow(clippy::absurd_extreme_comparisons)]
10214        #[allow(unused_comparisons)]
10215        if __tmp.remaining() < Self::ENCODED_LEN {
10216            panic!(
10217                "buffer is too small (need {} bytes, but got {})",
10218                Self::ENCODED_LEN,
10219                __tmp.remaining(),
10220            )
10221        }
10222        __tmp.put_u16_le(self.message_rate);
10223        __tmp.put_u8(self.stream_id);
10224        __tmp.put_u8(self.on_off);
10225        if matches!(version, MavlinkVersion::V2) {
10226            let len = __tmp.len();
10227            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10228        } else {
10229            __tmp.len()
10230        }
10231    }
10232}
10233#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10234#[doc = ""]
10235#[doc = "ID: 130"]
10236#[derive(Debug, Clone, PartialEq)]
10237#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10238#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10239#[cfg_attr(feature = "ts", derive(TS))]
10240#[cfg_attr(feature = "ts", ts(export))]
10241pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
10242    #[doc = "total data size (set on ACK only)."]
10243    pub size: u32,
10244    #[doc = "Width of a matrix or image."]
10245    pub width: u16,
10246    #[doc = "Height of a matrix or image."]
10247    pub height: u16,
10248    #[doc = "Number of packets being sent (set on ACK only)."]
10249    pub packets: u16,
10250    #[doc = "Type of requested/acknowledged data."]
10251    pub mavtype: MavlinkDataStreamType,
10252    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
10253    pub payload: u8,
10254    #[doc = "JPEG quality. Values: [1-100]."]
10255    pub jpg_quality: u8,
10256}
10257impl DATA_TRANSMISSION_HANDSHAKE_DATA {
10258    pub const ENCODED_LEN: usize = 13usize;
10259    pub const DEFAULT: Self = Self {
10260        size: 0_u32,
10261        width: 0_u16,
10262        height: 0_u16,
10263        packets: 0_u16,
10264        mavtype: MavlinkDataStreamType::DEFAULT,
10265        payload: 0_u8,
10266        jpg_quality: 0_u8,
10267    };
10268    #[cfg(feature = "arbitrary")]
10269    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10270        use arbitrary::{Arbitrary, Unstructured};
10271        let mut buf = [0u8; 1024];
10272        rng.fill_bytes(&mut buf);
10273        let mut unstructured = Unstructured::new(&buf);
10274        Self::arbitrary(&mut unstructured).unwrap_or_default()
10275    }
10276}
10277impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10278    fn default() -> Self {
10279        Self::DEFAULT.clone()
10280    }
10281}
10282impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10283    type Message = MavMessage;
10284    const ID: u32 = 130u32;
10285    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10286    const EXTRA_CRC: u8 = 29u8;
10287    const ENCODED_LEN: usize = 13usize;
10288    fn deser(
10289        _version: MavlinkVersion,
10290        __input: &[u8],
10291    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10292        let avail_len = __input.len();
10293        let mut payload_buf = [0; Self::ENCODED_LEN];
10294        let mut buf = if avail_len < Self::ENCODED_LEN {
10295            payload_buf[0..avail_len].copy_from_slice(__input);
10296            Bytes::new(&payload_buf)
10297        } else {
10298            Bytes::new(__input)
10299        };
10300        let mut __struct = Self::default();
10301        __struct.size = buf.get_u32_le();
10302        __struct.width = buf.get_u16_le();
10303        __struct.height = buf.get_u16_le();
10304        __struct.packets = buf.get_u16_le();
10305        let tmp = buf.get_u8();
10306        __struct.mavtype =
10307            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10308                enum_type: "MavlinkDataStreamType",
10309                value: tmp as u32,
10310            })?;
10311        __struct.payload = buf.get_u8();
10312        __struct.jpg_quality = buf.get_u8();
10313        Ok(__struct)
10314    }
10315    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10316        let mut __tmp = BytesMut::new(bytes);
10317        #[allow(clippy::absurd_extreme_comparisons)]
10318        #[allow(unused_comparisons)]
10319        if __tmp.remaining() < Self::ENCODED_LEN {
10320            panic!(
10321                "buffer is too small (need {} bytes, but got {})",
10322                Self::ENCODED_LEN,
10323                __tmp.remaining(),
10324            )
10325        }
10326        __tmp.put_u32_le(self.size);
10327        __tmp.put_u16_le(self.width);
10328        __tmp.put_u16_le(self.height);
10329        __tmp.put_u16_le(self.packets);
10330        __tmp.put_u8(self.mavtype as u8);
10331        __tmp.put_u8(self.payload);
10332        __tmp.put_u8(self.jpg_quality);
10333        if matches!(version, MavlinkVersion::V2) {
10334            let len = __tmp.len();
10335            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10336        } else {
10337            __tmp.len()
10338        }
10339    }
10340}
10341#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10342#[doc = ""]
10343#[doc = "ID: 254"]
10344#[derive(Debug, Clone, PartialEq)]
10345#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10346#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10347#[cfg_attr(feature = "ts", derive(TS))]
10348#[cfg_attr(feature = "ts", ts(export))]
10349pub struct DEBUG_DATA {
10350    #[doc = "Timestamp (time since system boot)."]
10351    pub time_boot_ms: u32,
10352    #[doc = "DEBUG value"]
10353    pub value: f32,
10354    #[doc = "index of debug variable"]
10355    pub ind: u8,
10356}
10357impl DEBUG_DATA {
10358    pub const ENCODED_LEN: usize = 9usize;
10359    pub const DEFAULT: Self = Self {
10360        time_boot_ms: 0_u32,
10361        value: 0.0_f32,
10362        ind: 0_u8,
10363    };
10364    #[cfg(feature = "arbitrary")]
10365    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10366        use arbitrary::{Arbitrary, Unstructured};
10367        let mut buf = [0u8; 1024];
10368        rng.fill_bytes(&mut buf);
10369        let mut unstructured = Unstructured::new(&buf);
10370        Self::arbitrary(&mut unstructured).unwrap_or_default()
10371    }
10372}
10373impl Default for DEBUG_DATA {
10374    fn default() -> Self {
10375        Self::DEFAULT.clone()
10376    }
10377}
10378impl MessageData for DEBUG_DATA {
10379    type Message = MavMessage;
10380    const ID: u32 = 254u32;
10381    const NAME: &'static str = "DEBUG";
10382    const EXTRA_CRC: u8 = 46u8;
10383    const ENCODED_LEN: usize = 9usize;
10384    fn deser(
10385        _version: MavlinkVersion,
10386        __input: &[u8],
10387    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10388        let avail_len = __input.len();
10389        let mut payload_buf = [0; Self::ENCODED_LEN];
10390        let mut buf = if avail_len < Self::ENCODED_LEN {
10391            payload_buf[0..avail_len].copy_from_slice(__input);
10392            Bytes::new(&payload_buf)
10393        } else {
10394            Bytes::new(__input)
10395        };
10396        let mut __struct = Self::default();
10397        __struct.time_boot_ms = buf.get_u32_le();
10398        __struct.value = buf.get_f32_le();
10399        __struct.ind = buf.get_u8();
10400        Ok(__struct)
10401    }
10402    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10403        let mut __tmp = BytesMut::new(bytes);
10404        #[allow(clippy::absurd_extreme_comparisons)]
10405        #[allow(unused_comparisons)]
10406        if __tmp.remaining() < Self::ENCODED_LEN {
10407            panic!(
10408                "buffer is too small (need {} bytes, but got {})",
10409                Self::ENCODED_LEN,
10410                __tmp.remaining(),
10411            )
10412        }
10413        __tmp.put_u32_le(self.time_boot_ms);
10414        __tmp.put_f32_le(self.value);
10415        __tmp.put_u8(self.ind);
10416        if matches!(version, MavlinkVersion::V2) {
10417            let len = __tmp.len();
10418            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10419        } else {
10420            __tmp.len()
10421        }
10422    }
10423}
10424#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10425#[doc = ""]
10426#[doc = "ID: 350"]
10427#[derive(Debug, Clone, PartialEq)]
10428#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10429#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10430#[cfg_attr(feature = "ts", derive(TS))]
10431#[cfg_attr(feature = "ts", ts(export))]
10432pub struct DEBUG_FLOAT_ARRAY_DATA {
10433    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10434    pub time_usec: u64,
10435    #[doc = "Unique ID used to discriminate between arrays"]
10436    pub array_id: u16,
10437    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10438    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10439    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10440    pub name: [u8; 10],
10441    #[doc = "data"]
10442    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10443    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10444    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10445    pub data: [f32; 58],
10446}
10447impl DEBUG_FLOAT_ARRAY_DATA {
10448    pub const ENCODED_LEN: usize = 252usize;
10449    pub const DEFAULT: Self = Self {
10450        time_usec: 0_u64,
10451        array_id: 0_u16,
10452        name: [0_u8; 10usize],
10453        data: [0.0_f32; 58usize],
10454    };
10455    #[cfg(feature = "arbitrary")]
10456    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10457        use arbitrary::{Arbitrary, Unstructured};
10458        let mut buf = [0u8; 1024];
10459        rng.fill_bytes(&mut buf);
10460        let mut unstructured = Unstructured::new(&buf);
10461        Self::arbitrary(&mut unstructured).unwrap_or_default()
10462    }
10463}
10464impl Default for DEBUG_FLOAT_ARRAY_DATA {
10465    fn default() -> Self {
10466        Self::DEFAULT.clone()
10467    }
10468}
10469impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10470    type Message = MavMessage;
10471    const ID: u32 = 350u32;
10472    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10473    const EXTRA_CRC: u8 = 232u8;
10474    const ENCODED_LEN: usize = 252usize;
10475    fn deser(
10476        _version: MavlinkVersion,
10477        __input: &[u8],
10478    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10479        let avail_len = __input.len();
10480        let mut payload_buf = [0; Self::ENCODED_LEN];
10481        let mut buf = if avail_len < Self::ENCODED_LEN {
10482            payload_buf[0..avail_len].copy_from_slice(__input);
10483            Bytes::new(&payload_buf)
10484        } else {
10485            Bytes::new(__input)
10486        };
10487        let mut __struct = Self::default();
10488        __struct.time_usec = buf.get_u64_le();
10489        __struct.array_id = buf.get_u16_le();
10490        for v in &mut __struct.name {
10491            let val = buf.get_u8();
10492            *v = val;
10493        }
10494        for v in &mut __struct.data {
10495            let val = buf.get_f32_le();
10496            *v = val;
10497        }
10498        Ok(__struct)
10499    }
10500    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10501        let mut __tmp = BytesMut::new(bytes);
10502        #[allow(clippy::absurd_extreme_comparisons)]
10503        #[allow(unused_comparisons)]
10504        if __tmp.remaining() < Self::ENCODED_LEN {
10505            panic!(
10506                "buffer is too small (need {} bytes, but got {})",
10507                Self::ENCODED_LEN,
10508                __tmp.remaining(),
10509            )
10510        }
10511        __tmp.put_u64_le(self.time_usec);
10512        __tmp.put_u16_le(self.array_id);
10513        for val in &self.name {
10514            __tmp.put_u8(*val);
10515        }
10516        if matches!(version, MavlinkVersion::V2) {
10517            for val in &self.data {
10518                __tmp.put_f32_le(*val);
10519            }
10520            let len = __tmp.len();
10521            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10522        } else {
10523            __tmp.len()
10524        }
10525    }
10526}
10527#[doc = "To debug something using a named 3D vector."]
10528#[doc = ""]
10529#[doc = "ID: 250"]
10530#[derive(Debug, Clone, PartialEq)]
10531#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10533#[cfg_attr(feature = "ts", derive(TS))]
10534#[cfg_attr(feature = "ts", ts(export))]
10535pub struct DEBUG_VECT_DATA {
10536    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10537    pub time_usec: u64,
10538    #[doc = "x"]
10539    pub x: f32,
10540    #[doc = "y"]
10541    pub y: f32,
10542    #[doc = "z"]
10543    pub z: f32,
10544    #[doc = "Name"]
10545    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10546    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10547    pub name: [u8; 10],
10548}
10549impl DEBUG_VECT_DATA {
10550    pub const ENCODED_LEN: usize = 30usize;
10551    pub const DEFAULT: Self = Self {
10552        time_usec: 0_u64,
10553        x: 0.0_f32,
10554        y: 0.0_f32,
10555        z: 0.0_f32,
10556        name: [0_u8; 10usize],
10557    };
10558    #[cfg(feature = "arbitrary")]
10559    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10560        use arbitrary::{Arbitrary, Unstructured};
10561        let mut buf = [0u8; 1024];
10562        rng.fill_bytes(&mut buf);
10563        let mut unstructured = Unstructured::new(&buf);
10564        Self::arbitrary(&mut unstructured).unwrap_or_default()
10565    }
10566}
10567impl Default for DEBUG_VECT_DATA {
10568    fn default() -> Self {
10569        Self::DEFAULT.clone()
10570    }
10571}
10572impl MessageData for DEBUG_VECT_DATA {
10573    type Message = MavMessage;
10574    const ID: u32 = 250u32;
10575    const NAME: &'static str = "DEBUG_VECT";
10576    const EXTRA_CRC: u8 = 49u8;
10577    const ENCODED_LEN: usize = 30usize;
10578    fn deser(
10579        _version: MavlinkVersion,
10580        __input: &[u8],
10581    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10582        let avail_len = __input.len();
10583        let mut payload_buf = [0; Self::ENCODED_LEN];
10584        let mut buf = if avail_len < Self::ENCODED_LEN {
10585            payload_buf[0..avail_len].copy_from_slice(__input);
10586            Bytes::new(&payload_buf)
10587        } else {
10588            Bytes::new(__input)
10589        };
10590        let mut __struct = Self::default();
10591        __struct.time_usec = buf.get_u64_le();
10592        __struct.x = buf.get_f32_le();
10593        __struct.y = buf.get_f32_le();
10594        __struct.z = buf.get_f32_le();
10595        for v in &mut __struct.name {
10596            let val = buf.get_u8();
10597            *v = val;
10598        }
10599        Ok(__struct)
10600    }
10601    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10602        let mut __tmp = BytesMut::new(bytes);
10603        #[allow(clippy::absurd_extreme_comparisons)]
10604        #[allow(unused_comparisons)]
10605        if __tmp.remaining() < Self::ENCODED_LEN {
10606            panic!(
10607                "buffer is too small (need {} bytes, but got {})",
10608                Self::ENCODED_LEN,
10609                __tmp.remaining(),
10610            )
10611        }
10612        __tmp.put_u64_le(self.time_usec);
10613        __tmp.put_f32_le(self.x);
10614        __tmp.put_f32_le(self.y);
10615        __tmp.put_f32_le(self.z);
10616        for val in &self.name {
10617            __tmp.put_u8(*val);
10618        }
10619        if matches!(version, MavlinkVersion::V2) {
10620            let len = __tmp.len();
10621            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10622        } else {
10623            __tmp.len()
10624        }
10625    }
10626}
10627#[doc = "Distance sensor information for an onboard rangefinder."]
10628#[doc = ""]
10629#[doc = "ID: 132"]
10630#[derive(Debug, Clone, PartialEq)]
10631#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10632#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10633#[cfg_attr(feature = "ts", derive(TS))]
10634#[cfg_attr(feature = "ts", ts(export))]
10635pub struct DISTANCE_SENSOR_DATA {
10636    #[doc = "Timestamp (time since system boot)."]
10637    pub time_boot_ms: u32,
10638    #[doc = "Minimum distance the sensor can measure"]
10639    pub min_distance: u16,
10640    #[doc = "Maximum distance the sensor can measure"]
10641    pub max_distance: u16,
10642    #[doc = "Current distance reading"]
10643    pub current_distance: u16,
10644    #[doc = "Type of distance sensor."]
10645    pub mavtype: MavDistanceSensor,
10646    #[doc = "Onboard ID of the sensor"]
10647    pub id: u8,
10648    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
10649    pub orientation: MavSensorOrientation,
10650    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
10651    pub covariance: u8,
10652    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10653    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10654    pub horizontal_fov: f32,
10655    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10656    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10657    pub vertical_fov: f32,
10658    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
10659    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10660    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10661    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10662    pub quaternion: [f32; 4],
10663    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
10664    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10665    pub signal_quality: u8,
10666}
10667impl DISTANCE_SENSOR_DATA {
10668    pub const ENCODED_LEN: usize = 39usize;
10669    pub const DEFAULT: Self = Self {
10670        time_boot_ms: 0_u32,
10671        min_distance: 0_u16,
10672        max_distance: 0_u16,
10673        current_distance: 0_u16,
10674        mavtype: MavDistanceSensor::DEFAULT,
10675        id: 0_u8,
10676        orientation: MavSensorOrientation::DEFAULT,
10677        covariance: 0_u8,
10678        horizontal_fov: 0.0_f32,
10679        vertical_fov: 0.0_f32,
10680        quaternion: [0.0_f32; 4usize],
10681        signal_quality: 0_u8,
10682    };
10683    #[cfg(feature = "arbitrary")]
10684    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10685        use arbitrary::{Arbitrary, Unstructured};
10686        let mut buf = [0u8; 1024];
10687        rng.fill_bytes(&mut buf);
10688        let mut unstructured = Unstructured::new(&buf);
10689        Self::arbitrary(&mut unstructured).unwrap_or_default()
10690    }
10691}
10692impl Default for DISTANCE_SENSOR_DATA {
10693    fn default() -> Self {
10694        Self::DEFAULT.clone()
10695    }
10696}
10697impl MessageData for DISTANCE_SENSOR_DATA {
10698    type Message = MavMessage;
10699    const ID: u32 = 132u32;
10700    const NAME: &'static str = "DISTANCE_SENSOR";
10701    const EXTRA_CRC: u8 = 85u8;
10702    const ENCODED_LEN: usize = 39usize;
10703    fn deser(
10704        _version: MavlinkVersion,
10705        __input: &[u8],
10706    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10707        let avail_len = __input.len();
10708        let mut payload_buf = [0; Self::ENCODED_LEN];
10709        let mut buf = if avail_len < Self::ENCODED_LEN {
10710            payload_buf[0..avail_len].copy_from_slice(__input);
10711            Bytes::new(&payload_buf)
10712        } else {
10713            Bytes::new(__input)
10714        };
10715        let mut __struct = Self::default();
10716        __struct.time_boot_ms = buf.get_u32_le();
10717        __struct.min_distance = buf.get_u16_le();
10718        __struct.max_distance = buf.get_u16_le();
10719        __struct.current_distance = buf.get_u16_le();
10720        let tmp = buf.get_u8();
10721        __struct.mavtype =
10722            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10723                enum_type: "MavDistanceSensor",
10724                value: tmp as u32,
10725            })?;
10726        __struct.id = buf.get_u8();
10727        let tmp = buf.get_u8();
10728        __struct.orientation =
10729            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10730                enum_type: "MavSensorOrientation",
10731                value: tmp as u32,
10732            })?;
10733        __struct.covariance = buf.get_u8();
10734        __struct.horizontal_fov = buf.get_f32_le();
10735        __struct.vertical_fov = buf.get_f32_le();
10736        for v in &mut __struct.quaternion {
10737            let val = buf.get_f32_le();
10738            *v = val;
10739        }
10740        __struct.signal_quality = buf.get_u8();
10741        Ok(__struct)
10742    }
10743    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10744        let mut __tmp = BytesMut::new(bytes);
10745        #[allow(clippy::absurd_extreme_comparisons)]
10746        #[allow(unused_comparisons)]
10747        if __tmp.remaining() < Self::ENCODED_LEN {
10748            panic!(
10749                "buffer is too small (need {} bytes, but got {})",
10750                Self::ENCODED_LEN,
10751                __tmp.remaining(),
10752            )
10753        }
10754        __tmp.put_u32_le(self.time_boot_ms);
10755        __tmp.put_u16_le(self.min_distance);
10756        __tmp.put_u16_le(self.max_distance);
10757        __tmp.put_u16_le(self.current_distance);
10758        __tmp.put_u8(self.mavtype as u8);
10759        __tmp.put_u8(self.id);
10760        __tmp.put_u8(self.orientation as u8);
10761        __tmp.put_u8(self.covariance);
10762        if matches!(version, MavlinkVersion::V2) {
10763            __tmp.put_f32_le(self.horizontal_fov);
10764            __tmp.put_f32_le(self.vertical_fov);
10765            for val in &self.quaternion {
10766                __tmp.put_f32_le(*val);
10767            }
10768            __tmp.put_u8(self.signal_quality);
10769            let len = __tmp.len();
10770            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10771        } else {
10772            __tmp.len()
10773        }
10774    }
10775}
10776#[doc = "EFI status output."]
10777#[doc = ""]
10778#[doc = "ID: 225"]
10779#[derive(Debug, Clone, PartialEq)]
10780#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10782#[cfg_attr(feature = "ts", derive(TS))]
10783#[cfg_attr(feature = "ts", ts(export))]
10784pub struct EFI_STATUS_DATA {
10785    #[doc = "ECU index"]
10786    pub ecu_index: f32,
10787    #[doc = "RPM"]
10788    pub rpm: f32,
10789    #[doc = "Fuel consumed"]
10790    pub fuel_consumed: f32,
10791    #[doc = "Fuel flow rate"]
10792    pub fuel_flow: f32,
10793    #[doc = "Engine load"]
10794    pub engine_load: f32,
10795    #[doc = "Throttle position"]
10796    pub throttle_position: f32,
10797    #[doc = "Spark dwell time"]
10798    pub spark_dwell_time: f32,
10799    #[doc = "Barometric pressure"]
10800    pub barometric_pressure: f32,
10801    #[doc = "Intake manifold pressure("]
10802    pub intake_manifold_pressure: f32,
10803    #[doc = "Intake manifold temperature"]
10804    pub intake_manifold_temperature: f32,
10805    #[doc = "Cylinder head temperature"]
10806    pub cylinder_head_temperature: f32,
10807    #[doc = "Ignition timing (Crank angle degrees)"]
10808    pub ignition_timing: f32,
10809    #[doc = "Injection time"]
10810    pub injection_time: f32,
10811    #[doc = "Exhaust gas temperature"]
10812    pub exhaust_gas_temperature: f32,
10813    #[doc = "Output throttle"]
10814    pub throttle_out: f32,
10815    #[doc = "Pressure/temperature compensation"]
10816    pub pt_compensation: f32,
10817    #[doc = "EFI health status"]
10818    pub health: u8,
10819    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
10820    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10821    pub ignition_voltage: f32,
10822    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
10823    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10824    pub fuel_pressure: f32,
10825}
10826impl EFI_STATUS_DATA {
10827    pub const ENCODED_LEN: usize = 73usize;
10828    pub const DEFAULT: Self = Self {
10829        ecu_index: 0.0_f32,
10830        rpm: 0.0_f32,
10831        fuel_consumed: 0.0_f32,
10832        fuel_flow: 0.0_f32,
10833        engine_load: 0.0_f32,
10834        throttle_position: 0.0_f32,
10835        spark_dwell_time: 0.0_f32,
10836        barometric_pressure: 0.0_f32,
10837        intake_manifold_pressure: 0.0_f32,
10838        intake_manifold_temperature: 0.0_f32,
10839        cylinder_head_temperature: 0.0_f32,
10840        ignition_timing: 0.0_f32,
10841        injection_time: 0.0_f32,
10842        exhaust_gas_temperature: 0.0_f32,
10843        throttle_out: 0.0_f32,
10844        pt_compensation: 0.0_f32,
10845        health: 0_u8,
10846        ignition_voltage: 0.0_f32,
10847        fuel_pressure: 0.0_f32,
10848    };
10849    #[cfg(feature = "arbitrary")]
10850    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10851        use arbitrary::{Arbitrary, Unstructured};
10852        let mut buf = [0u8; 1024];
10853        rng.fill_bytes(&mut buf);
10854        let mut unstructured = Unstructured::new(&buf);
10855        Self::arbitrary(&mut unstructured).unwrap_or_default()
10856    }
10857}
10858impl Default for EFI_STATUS_DATA {
10859    fn default() -> Self {
10860        Self::DEFAULT.clone()
10861    }
10862}
10863impl MessageData for EFI_STATUS_DATA {
10864    type Message = MavMessage;
10865    const ID: u32 = 225u32;
10866    const NAME: &'static str = "EFI_STATUS";
10867    const EXTRA_CRC: u8 = 208u8;
10868    const ENCODED_LEN: usize = 73usize;
10869    fn deser(
10870        _version: MavlinkVersion,
10871        __input: &[u8],
10872    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10873        let avail_len = __input.len();
10874        let mut payload_buf = [0; Self::ENCODED_LEN];
10875        let mut buf = if avail_len < Self::ENCODED_LEN {
10876            payload_buf[0..avail_len].copy_from_slice(__input);
10877            Bytes::new(&payload_buf)
10878        } else {
10879            Bytes::new(__input)
10880        };
10881        let mut __struct = Self::default();
10882        __struct.ecu_index = buf.get_f32_le();
10883        __struct.rpm = buf.get_f32_le();
10884        __struct.fuel_consumed = buf.get_f32_le();
10885        __struct.fuel_flow = buf.get_f32_le();
10886        __struct.engine_load = buf.get_f32_le();
10887        __struct.throttle_position = buf.get_f32_le();
10888        __struct.spark_dwell_time = buf.get_f32_le();
10889        __struct.barometric_pressure = buf.get_f32_le();
10890        __struct.intake_manifold_pressure = buf.get_f32_le();
10891        __struct.intake_manifold_temperature = buf.get_f32_le();
10892        __struct.cylinder_head_temperature = buf.get_f32_le();
10893        __struct.ignition_timing = buf.get_f32_le();
10894        __struct.injection_time = buf.get_f32_le();
10895        __struct.exhaust_gas_temperature = buf.get_f32_le();
10896        __struct.throttle_out = buf.get_f32_le();
10897        __struct.pt_compensation = buf.get_f32_le();
10898        __struct.health = buf.get_u8();
10899        __struct.ignition_voltage = buf.get_f32_le();
10900        __struct.fuel_pressure = buf.get_f32_le();
10901        Ok(__struct)
10902    }
10903    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10904        let mut __tmp = BytesMut::new(bytes);
10905        #[allow(clippy::absurd_extreme_comparisons)]
10906        #[allow(unused_comparisons)]
10907        if __tmp.remaining() < Self::ENCODED_LEN {
10908            panic!(
10909                "buffer is too small (need {} bytes, but got {})",
10910                Self::ENCODED_LEN,
10911                __tmp.remaining(),
10912            )
10913        }
10914        __tmp.put_f32_le(self.ecu_index);
10915        __tmp.put_f32_le(self.rpm);
10916        __tmp.put_f32_le(self.fuel_consumed);
10917        __tmp.put_f32_le(self.fuel_flow);
10918        __tmp.put_f32_le(self.engine_load);
10919        __tmp.put_f32_le(self.throttle_position);
10920        __tmp.put_f32_le(self.spark_dwell_time);
10921        __tmp.put_f32_le(self.barometric_pressure);
10922        __tmp.put_f32_le(self.intake_manifold_pressure);
10923        __tmp.put_f32_le(self.intake_manifold_temperature);
10924        __tmp.put_f32_le(self.cylinder_head_temperature);
10925        __tmp.put_f32_le(self.ignition_timing);
10926        __tmp.put_f32_le(self.injection_time);
10927        __tmp.put_f32_le(self.exhaust_gas_temperature);
10928        __tmp.put_f32_le(self.throttle_out);
10929        __tmp.put_f32_le(self.pt_compensation);
10930        __tmp.put_u8(self.health);
10931        if matches!(version, MavlinkVersion::V2) {
10932            __tmp.put_f32_le(self.ignition_voltage);
10933            __tmp.put_f32_le(self.fuel_pressure);
10934            let len = __tmp.len();
10935            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10936        } else {
10937            __tmp.len()
10938        }
10939    }
10940}
10941#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10942#[doc = ""]
10943#[doc = "ID: 131"]
10944#[derive(Debug, Clone, PartialEq)]
10945#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10946#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10947#[cfg_attr(feature = "ts", derive(TS))]
10948#[cfg_attr(feature = "ts", ts(export))]
10949pub struct ENCAPSULATED_DATA_DATA {
10950    #[doc = "sequence number (starting with 0 on every transmission)"]
10951    pub seqnr: u16,
10952    #[doc = "image data bytes"]
10953    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10954    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10955    pub data: [u8; 253],
10956}
10957impl ENCAPSULATED_DATA_DATA {
10958    pub const ENCODED_LEN: usize = 255usize;
10959    pub const DEFAULT: Self = Self {
10960        seqnr: 0_u16,
10961        data: [0_u8; 253usize],
10962    };
10963    #[cfg(feature = "arbitrary")]
10964    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10965        use arbitrary::{Arbitrary, Unstructured};
10966        let mut buf = [0u8; 1024];
10967        rng.fill_bytes(&mut buf);
10968        let mut unstructured = Unstructured::new(&buf);
10969        Self::arbitrary(&mut unstructured).unwrap_or_default()
10970    }
10971}
10972impl Default for ENCAPSULATED_DATA_DATA {
10973    fn default() -> Self {
10974        Self::DEFAULT.clone()
10975    }
10976}
10977impl MessageData for ENCAPSULATED_DATA_DATA {
10978    type Message = MavMessage;
10979    const ID: u32 = 131u32;
10980    const NAME: &'static str = "ENCAPSULATED_DATA";
10981    const EXTRA_CRC: u8 = 223u8;
10982    const ENCODED_LEN: usize = 255usize;
10983    fn deser(
10984        _version: MavlinkVersion,
10985        __input: &[u8],
10986    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10987        let avail_len = __input.len();
10988        let mut payload_buf = [0; Self::ENCODED_LEN];
10989        let mut buf = if avail_len < Self::ENCODED_LEN {
10990            payload_buf[0..avail_len].copy_from_slice(__input);
10991            Bytes::new(&payload_buf)
10992        } else {
10993            Bytes::new(__input)
10994        };
10995        let mut __struct = Self::default();
10996        __struct.seqnr = buf.get_u16_le();
10997        for v in &mut __struct.data {
10998            let val = buf.get_u8();
10999            *v = val;
11000        }
11001        Ok(__struct)
11002    }
11003    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11004        let mut __tmp = BytesMut::new(bytes);
11005        #[allow(clippy::absurd_extreme_comparisons)]
11006        #[allow(unused_comparisons)]
11007        if __tmp.remaining() < Self::ENCODED_LEN {
11008            panic!(
11009                "buffer is too small (need {} bytes, but got {})",
11010                Self::ENCODED_LEN,
11011                __tmp.remaining(),
11012            )
11013        }
11014        __tmp.put_u16_le(self.seqnr);
11015        for val in &self.data {
11016            __tmp.put_u8(*val);
11017        }
11018        if matches!(version, MavlinkVersion::V2) {
11019            let len = __tmp.len();
11020            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11021        } else {
11022            __tmp.len()
11023        }
11024    }
11025}
11026#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
11027#[doc = ""]
11028#[doc = "ID: 290"]
11029#[derive(Debug, Clone, PartialEq)]
11030#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11031#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11032#[cfg_attr(feature = "ts", derive(TS))]
11033#[cfg_attr(feature = "ts", ts(export))]
11034pub struct ESC_INFO_DATA {
11035    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11036    pub time_usec: u64,
11037    #[doc = "Number of reported errors by each ESC since boot."]
11038    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11039    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11040    pub error_count: [u32; 4],
11041    #[doc = "Counter of data packets received."]
11042    pub counter: u16,
11043    #[doc = "Bitmap of ESC failure flags."]
11044    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11045    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11046    pub failure_flags: [u16; 4],
11047    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
11048    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11049    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11050    pub temperature: [i16; 4],
11051    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11052    pub index: u8,
11053    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
11054    pub count: u8,
11055    #[doc = "Connection type protocol for all ESC."]
11056    pub connection_type: EscConnectionType,
11057    #[doc = "Information regarding online/offline status of each ESC."]
11058    pub info: u8,
11059}
11060impl ESC_INFO_DATA {
11061    pub const ENCODED_LEN: usize = 46usize;
11062    pub const DEFAULT: Self = Self {
11063        time_usec: 0_u64,
11064        error_count: [0_u32; 4usize],
11065        counter: 0_u16,
11066        failure_flags: [0_u16; 4usize],
11067        temperature: [0_i16; 4usize],
11068        index: 0_u8,
11069        count: 0_u8,
11070        connection_type: EscConnectionType::DEFAULT,
11071        info: 0_u8,
11072    };
11073    #[cfg(feature = "arbitrary")]
11074    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11075        use arbitrary::{Arbitrary, Unstructured};
11076        let mut buf = [0u8; 1024];
11077        rng.fill_bytes(&mut buf);
11078        let mut unstructured = Unstructured::new(&buf);
11079        Self::arbitrary(&mut unstructured).unwrap_or_default()
11080    }
11081}
11082impl Default for ESC_INFO_DATA {
11083    fn default() -> Self {
11084        Self::DEFAULT.clone()
11085    }
11086}
11087impl MessageData for ESC_INFO_DATA {
11088    type Message = MavMessage;
11089    const ID: u32 = 290u32;
11090    const NAME: &'static str = "ESC_INFO";
11091    const EXTRA_CRC: u8 = 251u8;
11092    const ENCODED_LEN: usize = 46usize;
11093    fn deser(
11094        _version: MavlinkVersion,
11095        __input: &[u8],
11096    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11097        let avail_len = __input.len();
11098        let mut payload_buf = [0; Self::ENCODED_LEN];
11099        let mut buf = if avail_len < Self::ENCODED_LEN {
11100            payload_buf[0..avail_len].copy_from_slice(__input);
11101            Bytes::new(&payload_buf)
11102        } else {
11103            Bytes::new(__input)
11104        };
11105        let mut __struct = Self::default();
11106        __struct.time_usec = buf.get_u64_le();
11107        for v in &mut __struct.error_count {
11108            let val = buf.get_u32_le();
11109            *v = val;
11110        }
11111        __struct.counter = buf.get_u16_le();
11112        for v in &mut __struct.failure_flags {
11113            let val = buf.get_u16_le();
11114            *v = val;
11115        }
11116        for v in &mut __struct.temperature {
11117            let val = buf.get_i16_le();
11118            *v = val;
11119        }
11120        __struct.index = buf.get_u8();
11121        __struct.count = buf.get_u8();
11122        let tmp = buf.get_u8();
11123        __struct.connection_type =
11124            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11125                enum_type: "EscConnectionType",
11126                value: tmp as u32,
11127            })?;
11128        __struct.info = buf.get_u8();
11129        Ok(__struct)
11130    }
11131    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11132        let mut __tmp = BytesMut::new(bytes);
11133        #[allow(clippy::absurd_extreme_comparisons)]
11134        #[allow(unused_comparisons)]
11135        if __tmp.remaining() < Self::ENCODED_LEN {
11136            panic!(
11137                "buffer is too small (need {} bytes, but got {})",
11138                Self::ENCODED_LEN,
11139                __tmp.remaining(),
11140            )
11141        }
11142        __tmp.put_u64_le(self.time_usec);
11143        for val in &self.error_count {
11144            __tmp.put_u32_le(*val);
11145        }
11146        __tmp.put_u16_le(self.counter);
11147        for val in &self.failure_flags {
11148            __tmp.put_u16_le(*val);
11149        }
11150        for val in &self.temperature {
11151            __tmp.put_i16_le(*val);
11152        }
11153        __tmp.put_u8(self.index);
11154        __tmp.put_u8(self.count);
11155        __tmp.put_u8(self.connection_type as u8);
11156        __tmp.put_u8(self.info);
11157        if matches!(version, MavlinkVersion::V2) {
11158            let len = __tmp.len();
11159            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11160        } else {
11161            __tmp.len()
11162        }
11163    }
11164}
11165#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
11166#[doc = ""]
11167#[doc = "ID: 291"]
11168#[derive(Debug, Clone, PartialEq)]
11169#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11170#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11171#[cfg_attr(feature = "ts", derive(TS))]
11172#[cfg_attr(feature = "ts", ts(export))]
11173pub struct ESC_STATUS_DATA {
11174    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11175    pub time_usec: u64,
11176    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
11177    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11178    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11179    pub rpm: [i32; 4],
11180    #[doc = "Voltage measured from each ESC."]
11181    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11182    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11183    pub voltage: [f32; 4],
11184    #[doc = "Current measured from each ESC."]
11185    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11186    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11187    pub current: [f32; 4],
11188    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11189    pub index: u8,
11190}
11191impl ESC_STATUS_DATA {
11192    pub const ENCODED_LEN: usize = 57usize;
11193    pub const DEFAULT: Self = Self {
11194        time_usec: 0_u64,
11195        rpm: [0_i32; 4usize],
11196        voltage: [0.0_f32; 4usize],
11197        current: [0.0_f32; 4usize],
11198        index: 0_u8,
11199    };
11200    #[cfg(feature = "arbitrary")]
11201    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11202        use arbitrary::{Arbitrary, Unstructured};
11203        let mut buf = [0u8; 1024];
11204        rng.fill_bytes(&mut buf);
11205        let mut unstructured = Unstructured::new(&buf);
11206        Self::arbitrary(&mut unstructured).unwrap_or_default()
11207    }
11208}
11209impl Default for ESC_STATUS_DATA {
11210    fn default() -> Self {
11211        Self::DEFAULT.clone()
11212    }
11213}
11214impl MessageData for ESC_STATUS_DATA {
11215    type Message = MavMessage;
11216    const ID: u32 = 291u32;
11217    const NAME: &'static str = "ESC_STATUS";
11218    const EXTRA_CRC: u8 = 10u8;
11219    const ENCODED_LEN: usize = 57usize;
11220    fn deser(
11221        _version: MavlinkVersion,
11222        __input: &[u8],
11223    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11224        let avail_len = __input.len();
11225        let mut payload_buf = [0; Self::ENCODED_LEN];
11226        let mut buf = if avail_len < Self::ENCODED_LEN {
11227            payload_buf[0..avail_len].copy_from_slice(__input);
11228            Bytes::new(&payload_buf)
11229        } else {
11230            Bytes::new(__input)
11231        };
11232        let mut __struct = Self::default();
11233        __struct.time_usec = buf.get_u64_le();
11234        for v in &mut __struct.rpm {
11235            let val = buf.get_i32_le();
11236            *v = val;
11237        }
11238        for v in &mut __struct.voltage {
11239            let val = buf.get_f32_le();
11240            *v = val;
11241        }
11242        for v in &mut __struct.current {
11243            let val = buf.get_f32_le();
11244            *v = val;
11245        }
11246        __struct.index = buf.get_u8();
11247        Ok(__struct)
11248    }
11249    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11250        let mut __tmp = BytesMut::new(bytes);
11251        #[allow(clippy::absurd_extreme_comparisons)]
11252        #[allow(unused_comparisons)]
11253        if __tmp.remaining() < Self::ENCODED_LEN {
11254            panic!(
11255                "buffer is too small (need {} bytes, but got {})",
11256                Self::ENCODED_LEN,
11257                __tmp.remaining(),
11258            )
11259        }
11260        __tmp.put_u64_le(self.time_usec);
11261        for val in &self.rpm {
11262            __tmp.put_i32_le(*val);
11263        }
11264        for val in &self.voltage {
11265            __tmp.put_f32_le(*val);
11266        }
11267        for val in &self.current {
11268            __tmp.put_f32_le(*val);
11269        }
11270        __tmp.put_u8(self.index);
11271        if matches!(version, MavlinkVersion::V2) {
11272            let len = __tmp.len();
11273            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11274        } else {
11275            __tmp.len()
11276        }
11277    }
11278}
11279#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
11280#[doc = ""]
11281#[doc = "ID: 230"]
11282#[derive(Debug, Clone, PartialEq)]
11283#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11284#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11285#[cfg_attr(feature = "ts", derive(TS))]
11286#[cfg_attr(feature = "ts", ts(export))]
11287pub struct ESTIMATOR_STATUS_DATA {
11288    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11289    pub time_usec: u64,
11290    #[doc = "Velocity innovation test ratio"]
11291    pub vel_ratio: f32,
11292    #[doc = "Horizontal position innovation test ratio"]
11293    pub pos_horiz_ratio: f32,
11294    #[doc = "Vertical position innovation test ratio"]
11295    pub pos_vert_ratio: f32,
11296    #[doc = "Magnetometer innovation test ratio"]
11297    pub mag_ratio: f32,
11298    #[doc = "Height above terrain innovation test ratio"]
11299    pub hagl_ratio: f32,
11300    #[doc = "True airspeed innovation test ratio"]
11301    pub tas_ratio: f32,
11302    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
11303    pub pos_horiz_accuracy: f32,
11304    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
11305    pub pos_vert_accuracy: f32,
11306    #[doc = "Bitmap indicating which EKF outputs are valid."]
11307    pub flags: EstimatorStatusFlags,
11308}
11309impl ESTIMATOR_STATUS_DATA {
11310    pub const ENCODED_LEN: usize = 42usize;
11311    pub const DEFAULT: Self = Self {
11312        time_usec: 0_u64,
11313        vel_ratio: 0.0_f32,
11314        pos_horiz_ratio: 0.0_f32,
11315        pos_vert_ratio: 0.0_f32,
11316        mag_ratio: 0.0_f32,
11317        hagl_ratio: 0.0_f32,
11318        tas_ratio: 0.0_f32,
11319        pos_horiz_accuracy: 0.0_f32,
11320        pos_vert_accuracy: 0.0_f32,
11321        flags: EstimatorStatusFlags::DEFAULT,
11322    };
11323    #[cfg(feature = "arbitrary")]
11324    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11325        use arbitrary::{Arbitrary, Unstructured};
11326        let mut buf = [0u8; 1024];
11327        rng.fill_bytes(&mut buf);
11328        let mut unstructured = Unstructured::new(&buf);
11329        Self::arbitrary(&mut unstructured).unwrap_or_default()
11330    }
11331}
11332impl Default for ESTIMATOR_STATUS_DATA {
11333    fn default() -> Self {
11334        Self::DEFAULT.clone()
11335    }
11336}
11337impl MessageData for ESTIMATOR_STATUS_DATA {
11338    type Message = MavMessage;
11339    const ID: u32 = 230u32;
11340    const NAME: &'static str = "ESTIMATOR_STATUS";
11341    const EXTRA_CRC: u8 = 163u8;
11342    const ENCODED_LEN: usize = 42usize;
11343    fn deser(
11344        _version: MavlinkVersion,
11345        __input: &[u8],
11346    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11347        let avail_len = __input.len();
11348        let mut payload_buf = [0; Self::ENCODED_LEN];
11349        let mut buf = if avail_len < Self::ENCODED_LEN {
11350            payload_buf[0..avail_len].copy_from_slice(__input);
11351            Bytes::new(&payload_buf)
11352        } else {
11353            Bytes::new(__input)
11354        };
11355        let mut __struct = Self::default();
11356        __struct.time_usec = buf.get_u64_le();
11357        __struct.vel_ratio = buf.get_f32_le();
11358        __struct.pos_horiz_ratio = buf.get_f32_le();
11359        __struct.pos_vert_ratio = buf.get_f32_le();
11360        __struct.mag_ratio = buf.get_f32_le();
11361        __struct.hagl_ratio = buf.get_f32_le();
11362        __struct.tas_ratio = buf.get_f32_le();
11363        __struct.pos_horiz_accuracy = buf.get_f32_le();
11364        __struct.pos_vert_accuracy = buf.get_f32_le();
11365        let tmp = buf.get_u16_le();
11366        __struct.flags = EstimatorStatusFlags::from_bits(tmp & EstimatorStatusFlags::all().bits())
11367            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11368                flag_type: "EstimatorStatusFlags",
11369                value: tmp as u32,
11370            })?;
11371        Ok(__struct)
11372    }
11373    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11374        let mut __tmp = BytesMut::new(bytes);
11375        #[allow(clippy::absurd_extreme_comparisons)]
11376        #[allow(unused_comparisons)]
11377        if __tmp.remaining() < Self::ENCODED_LEN {
11378            panic!(
11379                "buffer is too small (need {} bytes, but got {})",
11380                Self::ENCODED_LEN,
11381                __tmp.remaining(),
11382            )
11383        }
11384        __tmp.put_u64_le(self.time_usec);
11385        __tmp.put_f32_le(self.vel_ratio);
11386        __tmp.put_f32_le(self.pos_horiz_ratio);
11387        __tmp.put_f32_le(self.pos_vert_ratio);
11388        __tmp.put_f32_le(self.mag_ratio);
11389        __tmp.put_f32_le(self.hagl_ratio);
11390        __tmp.put_f32_le(self.tas_ratio);
11391        __tmp.put_f32_le(self.pos_horiz_accuracy);
11392        __tmp.put_f32_le(self.pos_vert_accuracy);
11393        __tmp.put_u16_le(self.flags.bits());
11394        if matches!(version, MavlinkVersion::V2) {
11395            let len = __tmp.len();
11396            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11397        } else {
11398            __tmp.len()
11399        }
11400    }
11401}
11402#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11403#[doc = ""]
11404#[doc = "ID: 410"]
11405#[derive(Debug, Clone, PartialEq)]
11406#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11407#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11408#[cfg_attr(feature = "ts", derive(TS))]
11409#[cfg_attr(feature = "ts", ts(export))]
11410pub struct EVENT_DATA {
11411    #[doc = "Event ID (as defined in the component metadata)"]
11412    pub id: u32,
11413    #[doc = "Timestamp (time since system boot when the event happened)."]
11414    pub event_time_boot_ms: u32,
11415    #[doc = "Sequence number."]
11416    pub sequence: u16,
11417    #[doc = "Component ID"]
11418    pub destination_component: u8,
11419    #[doc = "System ID"]
11420    pub destination_system: u8,
11421    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11422    pub log_levels: u8,
11423    #[doc = "Arguments (depend on event ID)."]
11424    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11425    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11426    pub arguments: [u8; 40],
11427}
11428impl EVENT_DATA {
11429    pub const ENCODED_LEN: usize = 53usize;
11430    pub const DEFAULT: Self = Self {
11431        id: 0_u32,
11432        event_time_boot_ms: 0_u32,
11433        sequence: 0_u16,
11434        destination_component: 0_u8,
11435        destination_system: 0_u8,
11436        log_levels: 0_u8,
11437        arguments: [0_u8; 40usize],
11438    };
11439    #[cfg(feature = "arbitrary")]
11440    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11441        use arbitrary::{Arbitrary, Unstructured};
11442        let mut buf = [0u8; 1024];
11443        rng.fill_bytes(&mut buf);
11444        let mut unstructured = Unstructured::new(&buf);
11445        Self::arbitrary(&mut unstructured).unwrap_or_default()
11446    }
11447}
11448impl Default for EVENT_DATA {
11449    fn default() -> Self {
11450        Self::DEFAULT.clone()
11451    }
11452}
11453impl MessageData for EVENT_DATA {
11454    type Message = MavMessage;
11455    const ID: u32 = 410u32;
11456    const NAME: &'static str = "EVENT";
11457    const EXTRA_CRC: u8 = 160u8;
11458    const ENCODED_LEN: usize = 53usize;
11459    fn deser(
11460        _version: MavlinkVersion,
11461        __input: &[u8],
11462    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11463        let avail_len = __input.len();
11464        let mut payload_buf = [0; Self::ENCODED_LEN];
11465        let mut buf = if avail_len < Self::ENCODED_LEN {
11466            payload_buf[0..avail_len].copy_from_slice(__input);
11467            Bytes::new(&payload_buf)
11468        } else {
11469            Bytes::new(__input)
11470        };
11471        let mut __struct = Self::default();
11472        __struct.id = buf.get_u32_le();
11473        __struct.event_time_boot_ms = buf.get_u32_le();
11474        __struct.sequence = buf.get_u16_le();
11475        __struct.destination_component = buf.get_u8();
11476        __struct.destination_system = buf.get_u8();
11477        __struct.log_levels = buf.get_u8();
11478        for v in &mut __struct.arguments {
11479            let val = buf.get_u8();
11480            *v = val;
11481        }
11482        Ok(__struct)
11483    }
11484    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11485        let mut __tmp = BytesMut::new(bytes);
11486        #[allow(clippy::absurd_extreme_comparisons)]
11487        #[allow(unused_comparisons)]
11488        if __tmp.remaining() < Self::ENCODED_LEN {
11489            panic!(
11490                "buffer is too small (need {} bytes, but got {})",
11491                Self::ENCODED_LEN,
11492                __tmp.remaining(),
11493            )
11494        }
11495        __tmp.put_u32_le(self.id);
11496        __tmp.put_u32_le(self.event_time_boot_ms);
11497        __tmp.put_u16_le(self.sequence);
11498        __tmp.put_u8(self.destination_component);
11499        __tmp.put_u8(self.destination_system);
11500        __tmp.put_u8(self.log_levels);
11501        for val in &self.arguments {
11502            __tmp.put_u8(*val);
11503        }
11504        if matches!(version, MavlinkVersion::V2) {
11505            let len = __tmp.len();
11506            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11507        } else {
11508            __tmp.len()
11509        }
11510    }
11511}
11512#[doc = "Provides state for additional features."]
11513#[doc = ""]
11514#[doc = "ID: 245"]
11515#[derive(Debug, Clone, PartialEq)]
11516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11517#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11518#[cfg_attr(feature = "ts", derive(TS))]
11519#[cfg_attr(feature = "ts", ts(export))]
11520pub struct EXTENDED_SYS_STATE_DATA {
11521    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11522    pub vtol_state: MavVtolState,
11523    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11524    pub landed_state: MavLandedState,
11525}
11526impl EXTENDED_SYS_STATE_DATA {
11527    pub const ENCODED_LEN: usize = 2usize;
11528    pub const DEFAULT: Self = Self {
11529        vtol_state: MavVtolState::DEFAULT,
11530        landed_state: MavLandedState::DEFAULT,
11531    };
11532    #[cfg(feature = "arbitrary")]
11533    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11534        use arbitrary::{Arbitrary, Unstructured};
11535        let mut buf = [0u8; 1024];
11536        rng.fill_bytes(&mut buf);
11537        let mut unstructured = Unstructured::new(&buf);
11538        Self::arbitrary(&mut unstructured).unwrap_or_default()
11539    }
11540}
11541impl Default for EXTENDED_SYS_STATE_DATA {
11542    fn default() -> Self {
11543        Self::DEFAULT.clone()
11544    }
11545}
11546impl MessageData for EXTENDED_SYS_STATE_DATA {
11547    type Message = MavMessage;
11548    const ID: u32 = 245u32;
11549    const NAME: &'static str = "EXTENDED_SYS_STATE";
11550    const EXTRA_CRC: u8 = 130u8;
11551    const ENCODED_LEN: usize = 2usize;
11552    fn deser(
11553        _version: MavlinkVersion,
11554        __input: &[u8],
11555    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11556        let avail_len = __input.len();
11557        let mut payload_buf = [0; Self::ENCODED_LEN];
11558        let mut buf = if avail_len < Self::ENCODED_LEN {
11559            payload_buf[0..avail_len].copy_from_slice(__input);
11560            Bytes::new(&payload_buf)
11561        } else {
11562            Bytes::new(__input)
11563        };
11564        let mut __struct = Self::default();
11565        let tmp = buf.get_u8();
11566        __struct.vtol_state =
11567            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11568                enum_type: "MavVtolState",
11569                value: tmp as u32,
11570            })?;
11571        let tmp = buf.get_u8();
11572        __struct.landed_state =
11573            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11574                enum_type: "MavLandedState",
11575                value: tmp as u32,
11576            })?;
11577        Ok(__struct)
11578    }
11579    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11580        let mut __tmp = BytesMut::new(bytes);
11581        #[allow(clippy::absurd_extreme_comparisons)]
11582        #[allow(unused_comparisons)]
11583        if __tmp.remaining() < Self::ENCODED_LEN {
11584            panic!(
11585                "buffer is too small (need {} bytes, but got {})",
11586                Self::ENCODED_LEN,
11587                __tmp.remaining(),
11588            )
11589        }
11590        __tmp.put_u8(self.vtol_state as u8);
11591        __tmp.put_u8(self.landed_state as u8);
11592        if matches!(version, MavlinkVersion::V2) {
11593            let len = __tmp.len();
11594            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11595        } else {
11596            __tmp.len()
11597        }
11598    }
11599}
11600#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
11601#[doc = ""]
11602#[doc = "ID: 162"]
11603#[derive(Debug, Clone, PartialEq)]
11604#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11605#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11606#[cfg_attr(feature = "ts", derive(TS))]
11607#[cfg_attr(feature = "ts", ts(export))]
11608pub struct FENCE_STATUS_DATA {
11609    #[doc = "Time (since boot) of last breach."]
11610    pub breach_time: u32,
11611    #[doc = "Number of fence breaches."]
11612    pub breach_count: u16,
11613    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
11614    pub breach_status: u8,
11615    #[doc = "Last breach type."]
11616    pub breach_type: FenceBreach,
11617    #[doc = "Active action to prevent fence breach"]
11618    #[cfg_attr(feature = "serde", serde(default))]
11619    pub breach_mitigation: FenceMitigate,
11620}
11621impl FENCE_STATUS_DATA {
11622    pub const ENCODED_LEN: usize = 9usize;
11623    pub const DEFAULT: Self = Self {
11624        breach_time: 0_u32,
11625        breach_count: 0_u16,
11626        breach_status: 0_u8,
11627        breach_type: FenceBreach::DEFAULT,
11628        breach_mitigation: FenceMitigate::DEFAULT,
11629    };
11630    #[cfg(feature = "arbitrary")]
11631    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11632        use arbitrary::{Arbitrary, Unstructured};
11633        let mut buf = [0u8; 1024];
11634        rng.fill_bytes(&mut buf);
11635        let mut unstructured = Unstructured::new(&buf);
11636        Self::arbitrary(&mut unstructured).unwrap_or_default()
11637    }
11638}
11639impl Default for FENCE_STATUS_DATA {
11640    fn default() -> Self {
11641        Self::DEFAULT.clone()
11642    }
11643}
11644impl MessageData for FENCE_STATUS_DATA {
11645    type Message = MavMessage;
11646    const ID: u32 = 162u32;
11647    const NAME: &'static str = "FENCE_STATUS";
11648    const EXTRA_CRC: u8 = 189u8;
11649    const ENCODED_LEN: usize = 9usize;
11650    fn deser(
11651        _version: MavlinkVersion,
11652        __input: &[u8],
11653    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11654        let avail_len = __input.len();
11655        let mut payload_buf = [0; Self::ENCODED_LEN];
11656        let mut buf = if avail_len < Self::ENCODED_LEN {
11657            payload_buf[0..avail_len].copy_from_slice(__input);
11658            Bytes::new(&payload_buf)
11659        } else {
11660            Bytes::new(__input)
11661        };
11662        let mut __struct = Self::default();
11663        __struct.breach_time = buf.get_u32_le();
11664        __struct.breach_count = buf.get_u16_le();
11665        __struct.breach_status = buf.get_u8();
11666        let tmp = buf.get_u8();
11667        __struct.breach_type =
11668            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11669                enum_type: "FenceBreach",
11670                value: tmp as u32,
11671            })?;
11672        let tmp = buf.get_u8();
11673        __struct.breach_mitigation =
11674            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11675                enum_type: "FenceMitigate",
11676                value: tmp as u32,
11677            })?;
11678        Ok(__struct)
11679    }
11680    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11681        let mut __tmp = BytesMut::new(bytes);
11682        #[allow(clippy::absurd_extreme_comparisons)]
11683        #[allow(unused_comparisons)]
11684        if __tmp.remaining() < Self::ENCODED_LEN {
11685            panic!(
11686                "buffer is too small (need {} bytes, but got {})",
11687                Self::ENCODED_LEN,
11688                __tmp.remaining(),
11689            )
11690        }
11691        __tmp.put_u32_le(self.breach_time);
11692        __tmp.put_u16_le(self.breach_count);
11693        __tmp.put_u8(self.breach_status);
11694        __tmp.put_u8(self.breach_type as u8);
11695        if matches!(version, MavlinkVersion::V2) {
11696            __tmp.put_u8(self.breach_mitigation as u8);
11697            let len = __tmp.len();
11698            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11699        } else {
11700            __tmp.len()
11701        }
11702    }
11703}
11704#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
11705#[doc = ""]
11706#[doc = "ID: 110"]
11707#[derive(Debug, Clone, PartialEq)]
11708#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11709#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11710#[cfg_attr(feature = "ts", derive(TS))]
11711#[cfg_attr(feature = "ts", ts(export))]
11712pub struct FILE_TRANSFER_PROTOCOL_DATA {
11713    #[doc = "Network ID (0 for broadcast)"]
11714    pub target_network: u8,
11715    #[doc = "System ID (0 for broadcast)"]
11716    pub target_system: u8,
11717    #[doc = "Component ID (0 for broadcast)"]
11718    pub target_component: u8,
11719    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
11720    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11721    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11722    pub payload: [u8; 251],
11723}
11724impl FILE_TRANSFER_PROTOCOL_DATA {
11725    pub const ENCODED_LEN: usize = 254usize;
11726    pub const DEFAULT: Self = Self {
11727        target_network: 0_u8,
11728        target_system: 0_u8,
11729        target_component: 0_u8,
11730        payload: [0_u8; 251usize],
11731    };
11732    #[cfg(feature = "arbitrary")]
11733    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11734        use arbitrary::{Arbitrary, Unstructured};
11735        let mut buf = [0u8; 1024];
11736        rng.fill_bytes(&mut buf);
11737        let mut unstructured = Unstructured::new(&buf);
11738        Self::arbitrary(&mut unstructured).unwrap_or_default()
11739    }
11740}
11741impl Default for FILE_TRANSFER_PROTOCOL_DATA {
11742    fn default() -> Self {
11743        Self::DEFAULT.clone()
11744    }
11745}
11746impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
11747    type Message = MavMessage;
11748    const ID: u32 = 110u32;
11749    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
11750    const EXTRA_CRC: u8 = 84u8;
11751    const ENCODED_LEN: usize = 254usize;
11752    fn deser(
11753        _version: MavlinkVersion,
11754        __input: &[u8],
11755    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11756        let avail_len = __input.len();
11757        let mut payload_buf = [0; Self::ENCODED_LEN];
11758        let mut buf = if avail_len < Self::ENCODED_LEN {
11759            payload_buf[0..avail_len].copy_from_slice(__input);
11760            Bytes::new(&payload_buf)
11761        } else {
11762            Bytes::new(__input)
11763        };
11764        let mut __struct = Self::default();
11765        __struct.target_network = buf.get_u8();
11766        __struct.target_system = buf.get_u8();
11767        __struct.target_component = buf.get_u8();
11768        for v in &mut __struct.payload {
11769            let val = buf.get_u8();
11770            *v = val;
11771        }
11772        Ok(__struct)
11773    }
11774    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11775        let mut __tmp = BytesMut::new(bytes);
11776        #[allow(clippy::absurd_extreme_comparisons)]
11777        #[allow(unused_comparisons)]
11778        if __tmp.remaining() < Self::ENCODED_LEN {
11779            panic!(
11780                "buffer is too small (need {} bytes, but got {})",
11781                Self::ENCODED_LEN,
11782                __tmp.remaining(),
11783            )
11784        }
11785        __tmp.put_u8(self.target_network);
11786        __tmp.put_u8(self.target_system);
11787        __tmp.put_u8(self.target_component);
11788        for val in &self.payload {
11789            __tmp.put_u8(*val);
11790        }
11791        if matches!(version, MavlinkVersion::V2) {
11792            let len = __tmp.len();
11793            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11794        } else {
11795            __tmp.len()
11796        }
11797    }
11798}
11799#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
11800#[doc = ""]
11801#[doc = "ID: 264"]
11802#[derive(Debug, Clone, PartialEq)]
11803#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11804#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11805#[cfg_attr(feature = "ts", derive(TS))]
11806#[cfg_attr(feature = "ts", ts(export))]
11807pub struct FLIGHT_INFORMATION_DATA {
11808    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
11809    pub arming_time_utc: u64,
11810    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
11811    pub takeoff_time_utc: u64,
11812    #[doc = "Flight number. Note, field is misnamed UUID."]
11813    pub flight_uuid: u64,
11814    #[doc = "Timestamp (time since system boot)."]
11815    pub time_boot_ms: u32,
11816    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
11817    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11818    pub landing_time: u32,
11819}
11820impl FLIGHT_INFORMATION_DATA {
11821    pub const ENCODED_LEN: usize = 32usize;
11822    pub const DEFAULT: Self = Self {
11823        arming_time_utc: 0_u64,
11824        takeoff_time_utc: 0_u64,
11825        flight_uuid: 0_u64,
11826        time_boot_ms: 0_u32,
11827        landing_time: 0_u32,
11828    };
11829    #[cfg(feature = "arbitrary")]
11830    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11831        use arbitrary::{Arbitrary, Unstructured};
11832        let mut buf = [0u8; 1024];
11833        rng.fill_bytes(&mut buf);
11834        let mut unstructured = Unstructured::new(&buf);
11835        Self::arbitrary(&mut unstructured).unwrap_or_default()
11836    }
11837}
11838impl Default for FLIGHT_INFORMATION_DATA {
11839    fn default() -> Self {
11840        Self::DEFAULT.clone()
11841    }
11842}
11843impl MessageData for FLIGHT_INFORMATION_DATA {
11844    type Message = MavMessage;
11845    const ID: u32 = 264u32;
11846    const NAME: &'static str = "FLIGHT_INFORMATION";
11847    const EXTRA_CRC: u8 = 49u8;
11848    const ENCODED_LEN: usize = 32usize;
11849    fn deser(
11850        _version: MavlinkVersion,
11851        __input: &[u8],
11852    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11853        let avail_len = __input.len();
11854        let mut payload_buf = [0; Self::ENCODED_LEN];
11855        let mut buf = if avail_len < Self::ENCODED_LEN {
11856            payload_buf[0..avail_len].copy_from_slice(__input);
11857            Bytes::new(&payload_buf)
11858        } else {
11859            Bytes::new(__input)
11860        };
11861        let mut __struct = Self::default();
11862        __struct.arming_time_utc = buf.get_u64_le();
11863        __struct.takeoff_time_utc = buf.get_u64_le();
11864        __struct.flight_uuid = buf.get_u64_le();
11865        __struct.time_boot_ms = buf.get_u32_le();
11866        __struct.landing_time = buf.get_u32_le();
11867        Ok(__struct)
11868    }
11869    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11870        let mut __tmp = BytesMut::new(bytes);
11871        #[allow(clippy::absurd_extreme_comparisons)]
11872        #[allow(unused_comparisons)]
11873        if __tmp.remaining() < Self::ENCODED_LEN {
11874            panic!(
11875                "buffer is too small (need {} bytes, but got {})",
11876                Self::ENCODED_LEN,
11877                __tmp.remaining(),
11878            )
11879        }
11880        __tmp.put_u64_le(self.arming_time_utc);
11881        __tmp.put_u64_le(self.takeoff_time_utc);
11882        __tmp.put_u64_le(self.flight_uuid);
11883        __tmp.put_u32_le(self.time_boot_ms);
11884        if matches!(version, MavlinkVersion::V2) {
11885            __tmp.put_u32_le(self.landing_time);
11886            let len = __tmp.len();
11887            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11888        } else {
11889            __tmp.len()
11890        }
11891    }
11892}
11893#[doc = "Current motion information from a designated system."]
11894#[doc = ""]
11895#[doc = "ID: 144"]
11896#[derive(Debug, Clone, PartialEq)]
11897#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11898#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11899#[cfg_attr(feature = "ts", derive(TS))]
11900#[cfg_attr(feature = "ts", ts(export))]
11901pub struct FOLLOW_TARGET_DATA {
11902    #[doc = "Timestamp (time since system boot)."]
11903    pub timestamp: u64,
11904    #[doc = "button states or switches of a tracker device"]
11905    pub custom_state: u64,
11906    #[doc = "Latitude (WGS84)"]
11907    pub lat: i32,
11908    #[doc = "Longitude (WGS84)"]
11909    pub lon: i32,
11910    #[doc = "Altitude (MSL)"]
11911    pub alt: f32,
11912    #[doc = "target velocity (0,0,0) for unknown"]
11913    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11914    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11915    pub vel: [f32; 3],
11916    #[doc = "linear target acceleration (0,0,0) for unknown"]
11917    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11918    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11919    pub acc: [f32; 3],
11920    #[doc = "(0 0 0 0 for unknown)"]
11921    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11922    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11923    pub attitude_q: [f32; 4],
11924    #[doc = "(0 0 0 for unknown)"]
11925    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11926    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11927    pub rates: [f32; 3],
11928    #[doc = "eph epv"]
11929    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11930    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11931    pub position_cov: [f32; 3],
11932    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
11933    pub est_capabilities: u8,
11934}
11935impl FOLLOW_TARGET_DATA {
11936    pub const ENCODED_LEN: usize = 93usize;
11937    pub const DEFAULT: Self = Self {
11938        timestamp: 0_u64,
11939        custom_state: 0_u64,
11940        lat: 0_i32,
11941        lon: 0_i32,
11942        alt: 0.0_f32,
11943        vel: [0.0_f32; 3usize],
11944        acc: [0.0_f32; 3usize],
11945        attitude_q: [0.0_f32; 4usize],
11946        rates: [0.0_f32; 3usize],
11947        position_cov: [0.0_f32; 3usize],
11948        est_capabilities: 0_u8,
11949    };
11950    #[cfg(feature = "arbitrary")]
11951    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11952        use arbitrary::{Arbitrary, Unstructured};
11953        let mut buf = [0u8; 1024];
11954        rng.fill_bytes(&mut buf);
11955        let mut unstructured = Unstructured::new(&buf);
11956        Self::arbitrary(&mut unstructured).unwrap_or_default()
11957    }
11958}
11959impl Default for FOLLOW_TARGET_DATA {
11960    fn default() -> Self {
11961        Self::DEFAULT.clone()
11962    }
11963}
11964impl MessageData for FOLLOW_TARGET_DATA {
11965    type Message = MavMessage;
11966    const ID: u32 = 144u32;
11967    const NAME: &'static str = "FOLLOW_TARGET";
11968    const EXTRA_CRC: u8 = 127u8;
11969    const ENCODED_LEN: usize = 93usize;
11970    fn deser(
11971        _version: MavlinkVersion,
11972        __input: &[u8],
11973    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11974        let avail_len = __input.len();
11975        let mut payload_buf = [0; Self::ENCODED_LEN];
11976        let mut buf = if avail_len < Self::ENCODED_LEN {
11977            payload_buf[0..avail_len].copy_from_slice(__input);
11978            Bytes::new(&payload_buf)
11979        } else {
11980            Bytes::new(__input)
11981        };
11982        let mut __struct = Self::default();
11983        __struct.timestamp = buf.get_u64_le();
11984        __struct.custom_state = buf.get_u64_le();
11985        __struct.lat = buf.get_i32_le();
11986        __struct.lon = buf.get_i32_le();
11987        __struct.alt = buf.get_f32_le();
11988        for v in &mut __struct.vel {
11989            let val = buf.get_f32_le();
11990            *v = val;
11991        }
11992        for v in &mut __struct.acc {
11993            let val = buf.get_f32_le();
11994            *v = val;
11995        }
11996        for v in &mut __struct.attitude_q {
11997            let val = buf.get_f32_le();
11998            *v = val;
11999        }
12000        for v in &mut __struct.rates {
12001            let val = buf.get_f32_le();
12002            *v = val;
12003        }
12004        for v in &mut __struct.position_cov {
12005            let val = buf.get_f32_le();
12006            *v = val;
12007        }
12008        __struct.est_capabilities = buf.get_u8();
12009        Ok(__struct)
12010    }
12011    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12012        let mut __tmp = BytesMut::new(bytes);
12013        #[allow(clippy::absurd_extreme_comparisons)]
12014        #[allow(unused_comparisons)]
12015        if __tmp.remaining() < Self::ENCODED_LEN {
12016            panic!(
12017                "buffer is too small (need {} bytes, but got {})",
12018                Self::ENCODED_LEN,
12019                __tmp.remaining(),
12020            )
12021        }
12022        __tmp.put_u64_le(self.timestamp);
12023        __tmp.put_u64_le(self.custom_state);
12024        __tmp.put_i32_le(self.lat);
12025        __tmp.put_i32_le(self.lon);
12026        __tmp.put_f32_le(self.alt);
12027        for val in &self.vel {
12028            __tmp.put_f32_le(*val);
12029        }
12030        for val in &self.acc {
12031            __tmp.put_f32_le(*val);
12032        }
12033        for val in &self.attitude_q {
12034            __tmp.put_f32_le(*val);
12035        }
12036        for val in &self.rates {
12037            __tmp.put_f32_le(*val);
12038        }
12039        for val in &self.position_cov {
12040            __tmp.put_f32_le(*val);
12041        }
12042        __tmp.put_u8(self.est_capabilities);
12043        if matches!(version, MavlinkVersion::V2) {
12044            let len = __tmp.len();
12045            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12046        } else {
12047            __tmp.len()
12048        }
12049    }
12050}
12051#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
12052#[doc = ""]
12053#[doc = "ID: 371"]
12054#[derive(Debug, Clone, PartialEq)]
12055#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12056#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12057#[cfg_attr(feature = "ts", derive(TS))]
12058#[cfg_attr(feature = "ts", ts(export))]
12059pub struct FUEL_STATUS_DATA {
12060    #[doc = "Capacity when full. Must be provided."]
12061    pub maximum_fuel: f32,
12062    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12063    pub consumed_fuel: f32,
12064    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12065    pub remaining_fuel: f32,
12066    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12067    pub flow_rate: f32,
12068    #[doc = "Fuel temperature. NaN: field not provided."]
12069    pub temperature: f32,
12070    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12071    pub fuel_type: MavFuelType,
12072    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12073    pub id: u8,
12074    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12075    pub percent_remaining: u8,
12076}
12077impl FUEL_STATUS_DATA {
12078    pub const ENCODED_LEN: usize = 26usize;
12079    pub const DEFAULT: Self = Self {
12080        maximum_fuel: 0.0_f32,
12081        consumed_fuel: 0.0_f32,
12082        remaining_fuel: 0.0_f32,
12083        flow_rate: 0.0_f32,
12084        temperature: 0.0_f32,
12085        fuel_type: MavFuelType::DEFAULT,
12086        id: 0_u8,
12087        percent_remaining: 0_u8,
12088    };
12089    #[cfg(feature = "arbitrary")]
12090    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12091        use arbitrary::{Arbitrary, Unstructured};
12092        let mut buf = [0u8; 1024];
12093        rng.fill_bytes(&mut buf);
12094        let mut unstructured = Unstructured::new(&buf);
12095        Self::arbitrary(&mut unstructured).unwrap_or_default()
12096    }
12097}
12098impl Default for FUEL_STATUS_DATA {
12099    fn default() -> Self {
12100        Self::DEFAULT.clone()
12101    }
12102}
12103impl MessageData for FUEL_STATUS_DATA {
12104    type Message = MavMessage;
12105    const ID: u32 = 371u32;
12106    const NAME: &'static str = "FUEL_STATUS";
12107    const EXTRA_CRC: u8 = 10u8;
12108    const ENCODED_LEN: usize = 26usize;
12109    fn deser(
12110        _version: MavlinkVersion,
12111        __input: &[u8],
12112    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12113        let avail_len = __input.len();
12114        let mut payload_buf = [0; Self::ENCODED_LEN];
12115        let mut buf = if avail_len < Self::ENCODED_LEN {
12116            payload_buf[0..avail_len].copy_from_slice(__input);
12117            Bytes::new(&payload_buf)
12118        } else {
12119            Bytes::new(__input)
12120        };
12121        let mut __struct = Self::default();
12122        __struct.maximum_fuel = buf.get_f32_le();
12123        __struct.consumed_fuel = buf.get_f32_le();
12124        __struct.remaining_fuel = buf.get_f32_le();
12125        __struct.flow_rate = buf.get_f32_le();
12126        __struct.temperature = buf.get_f32_le();
12127        let tmp = buf.get_u32_le();
12128        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12129            ::mavlink_core::error::ParserError::InvalidEnum {
12130                enum_type: "MavFuelType",
12131                value: tmp as u32,
12132            },
12133        )?;
12134        __struct.id = buf.get_u8();
12135        __struct.percent_remaining = buf.get_u8();
12136        Ok(__struct)
12137    }
12138    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12139        let mut __tmp = BytesMut::new(bytes);
12140        #[allow(clippy::absurd_extreme_comparisons)]
12141        #[allow(unused_comparisons)]
12142        if __tmp.remaining() < Self::ENCODED_LEN {
12143            panic!(
12144                "buffer is too small (need {} bytes, but got {})",
12145                Self::ENCODED_LEN,
12146                __tmp.remaining(),
12147            )
12148        }
12149        __tmp.put_f32_le(self.maximum_fuel);
12150        __tmp.put_f32_le(self.consumed_fuel);
12151        __tmp.put_f32_le(self.remaining_fuel);
12152        __tmp.put_f32_le(self.flow_rate);
12153        __tmp.put_f32_le(self.temperature);
12154        __tmp.put_u32_le(self.fuel_type as u32);
12155        __tmp.put_u8(self.id);
12156        __tmp.put_u8(self.percent_remaining);
12157        if matches!(version, MavlinkVersion::V2) {
12158            let len = __tmp.len();
12159            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12160        } else {
12161            __tmp.len()
12162        }
12163    }
12164}
12165#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
12166#[doc = ""]
12167#[doc = "ID: 373"]
12168#[derive(Debug, Clone, PartialEq)]
12169#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12170#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12171#[cfg_attr(feature = "ts", derive(TS))]
12172#[cfg_attr(feature = "ts", ts(export))]
12173pub struct GENERATOR_STATUS_DATA {
12174    #[doc = "Status flags."]
12175    pub status: MavGeneratorStatusFlag,
12176    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
12177    pub battery_current: f32,
12178    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
12179    pub load_current: f32,
12180    #[doc = "The power being generated. NaN: field not provided"]
12181    pub power_generated: f32,
12182    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
12183    pub bus_voltage: f32,
12184    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
12185    pub bat_current_setpoint: f32,
12186    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
12187    pub runtime: u32,
12188    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
12189    pub time_until_maintenance: i32,
12190    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
12191    pub generator_speed: u16,
12192    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
12193    pub rectifier_temperature: i16,
12194    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
12195    pub generator_temperature: i16,
12196}
12197impl GENERATOR_STATUS_DATA {
12198    pub const ENCODED_LEN: usize = 42usize;
12199    pub const DEFAULT: Self = Self {
12200        status: MavGeneratorStatusFlag::DEFAULT,
12201        battery_current: 0.0_f32,
12202        load_current: 0.0_f32,
12203        power_generated: 0.0_f32,
12204        bus_voltage: 0.0_f32,
12205        bat_current_setpoint: 0.0_f32,
12206        runtime: 0_u32,
12207        time_until_maintenance: 0_i32,
12208        generator_speed: 0_u16,
12209        rectifier_temperature: 0_i16,
12210        generator_temperature: 0_i16,
12211    };
12212    #[cfg(feature = "arbitrary")]
12213    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12214        use arbitrary::{Arbitrary, Unstructured};
12215        let mut buf = [0u8; 1024];
12216        rng.fill_bytes(&mut buf);
12217        let mut unstructured = Unstructured::new(&buf);
12218        Self::arbitrary(&mut unstructured).unwrap_or_default()
12219    }
12220}
12221impl Default for GENERATOR_STATUS_DATA {
12222    fn default() -> Self {
12223        Self::DEFAULT.clone()
12224    }
12225}
12226impl MessageData for GENERATOR_STATUS_DATA {
12227    type Message = MavMessage;
12228    const ID: u32 = 373u32;
12229    const NAME: &'static str = "GENERATOR_STATUS";
12230    const EXTRA_CRC: u8 = 117u8;
12231    const ENCODED_LEN: usize = 42usize;
12232    fn deser(
12233        _version: MavlinkVersion,
12234        __input: &[u8],
12235    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12236        let avail_len = __input.len();
12237        let mut payload_buf = [0; Self::ENCODED_LEN];
12238        let mut buf = if avail_len < Self::ENCODED_LEN {
12239            payload_buf[0..avail_len].copy_from_slice(__input);
12240            Bytes::new(&payload_buf)
12241        } else {
12242            Bytes::new(__input)
12243        };
12244        let mut __struct = Self::default();
12245        let tmp = buf.get_u64_le();
12246        __struct.status = MavGeneratorStatusFlag::from_bits(
12247            tmp & MavGeneratorStatusFlag::all().bits(),
12248        )
12249        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12250            flag_type: "MavGeneratorStatusFlag",
12251            value: tmp as u32,
12252        })?;
12253        __struct.battery_current = buf.get_f32_le();
12254        __struct.load_current = buf.get_f32_le();
12255        __struct.power_generated = buf.get_f32_le();
12256        __struct.bus_voltage = buf.get_f32_le();
12257        __struct.bat_current_setpoint = buf.get_f32_le();
12258        __struct.runtime = buf.get_u32_le();
12259        __struct.time_until_maintenance = buf.get_i32_le();
12260        __struct.generator_speed = buf.get_u16_le();
12261        __struct.rectifier_temperature = buf.get_i16_le();
12262        __struct.generator_temperature = buf.get_i16_le();
12263        Ok(__struct)
12264    }
12265    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12266        let mut __tmp = BytesMut::new(bytes);
12267        #[allow(clippy::absurd_extreme_comparisons)]
12268        #[allow(unused_comparisons)]
12269        if __tmp.remaining() < Self::ENCODED_LEN {
12270            panic!(
12271                "buffer is too small (need {} bytes, but got {})",
12272                Self::ENCODED_LEN,
12273                __tmp.remaining(),
12274            )
12275        }
12276        __tmp.put_u64_le(self.status.bits());
12277        __tmp.put_f32_le(self.battery_current);
12278        __tmp.put_f32_le(self.load_current);
12279        __tmp.put_f32_le(self.power_generated);
12280        __tmp.put_f32_le(self.bus_voltage);
12281        __tmp.put_f32_le(self.bat_current_setpoint);
12282        __tmp.put_u32_le(self.runtime);
12283        __tmp.put_i32_le(self.time_until_maintenance);
12284        __tmp.put_u16_le(self.generator_speed);
12285        __tmp.put_i16_le(self.rectifier_temperature);
12286        __tmp.put_i16_le(self.generator_temperature);
12287        if matches!(version, MavlinkVersion::V2) {
12288            let len = __tmp.len();
12289            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12290        } else {
12291            __tmp.len()
12292        }
12293    }
12294}
12295#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
12296#[doc = ""]
12297#[doc = "ID: 285"]
12298#[derive(Debug, Clone, PartialEq)]
12299#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12300#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12301#[cfg_attr(feature = "ts", derive(TS))]
12302#[cfg_attr(feature = "ts", ts(export))]
12303pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12304    #[doc = "Timestamp (time since system boot)."]
12305    pub time_boot_ms: u32,
12306    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
12307    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12308    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12309    pub q: [f32; 4],
12310    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
12311    pub angular_velocity_x: f32,
12312    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
12313    pub angular_velocity_y: f32,
12314    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
12315    pub angular_velocity_z: f32,
12316    #[doc = "Failure flags (0 for no failure)"]
12317    pub failure_flags: GimbalDeviceErrorFlags,
12318    #[doc = "Current gimbal flags set."]
12319    pub flags: GimbalDeviceFlags,
12320    #[doc = "System ID"]
12321    pub target_system: u8,
12322    #[doc = "Component ID"]
12323    pub target_component: u8,
12324    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
12325    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12326    pub delta_yaw: f32,
12327    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
12328    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12329    pub delta_yaw_velocity: f32,
12330    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12331    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12332    pub gimbal_device_id: u8,
12333}
12334impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12335    pub const ENCODED_LEN: usize = 49usize;
12336    pub const DEFAULT: Self = Self {
12337        time_boot_ms: 0_u32,
12338        q: [0.0_f32; 4usize],
12339        angular_velocity_x: 0.0_f32,
12340        angular_velocity_y: 0.0_f32,
12341        angular_velocity_z: 0.0_f32,
12342        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
12343        flags: GimbalDeviceFlags::DEFAULT,
12344        target_system: 0_u8,
12345        target_component: 0_u8,
12346        delta_yaw: 0.0_f32,
12347        delta_yaw_velocity: 0.0_f32,
12348        gimbal_device_id: 0_u8,
12349    };
12350    #[cfg(feature = "arbitrary")]
12351    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12352        use arbitrary::{Arbitrary, Unstructured};
12353        let mut buf = [0u8; 1024];
12354        rng.fill_bytes(&mut buf);
12355        let mut unstructured = Unstructured::new(&buf);
12356        Self::arbitrary(&mut unstructured).unwrap_or_default()
12357    }
12358}
12359impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12360    fn default() -> Self {
12361        Self::DEFAULT.clone()
12362    }
12363}
12364impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12365    type Message = MavMessage;
12366    const ID: u32 = 285u32;
12367    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
12368    const EXTRA_CRC: u8 = 137u8;
12369    const ENCODED_LEN: usize = 49usize;
12370    fn deser(
12371        _version: MavlinkVersion,
12372        __input: &[u8],
12373    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12374        let avail_len = __input.len();
12375        let mut payload_buf = [0; Self::ENCODED_LEN];
12376        let mut buf = if avail_len < Self::ENCODED_LEN {
12377            payload_buf[0..avail_len].copy_from_slice(__input);
12378            Bytes::new(&payload_buf)
12379        } else {
12380            Bytes::new(__input)
12381        };
12382        let mut __struct = Self::default();
12383        __struct.time_boot_ms = buf.get_u32_le();
12384        for v in &mut __struct.q {
12385            let val = buf.get_f32_le();
12386            *v = val;
12387        }
12388        __struct.angular_velocity_x = buf.get_f32_le();
12389        __struct.angular_velocity_y = buf.get_f32_le();
12390        __struct.angular_velocity_z = buf.get_f32_le();
12391        let tmp = buf.get_u32_le();
12392        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(
12393            tmp & GimbalDeviceErrorFlags::all().bits(),
12394        )
12395        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12396            flag_type: "GimbalDeviceErrorFlags",
12397            value: tmp as u32,
12398        })?;
12399        let tmp = buf.get_u16_le();
12400        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
12401            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12402                flag_type: "GimbalDeviceFlags",
12403                value: tmp as u32,
12404            })?;
12405        __struct.target_system = buf.get_u8();
12406        __struct.target_component = buf.get_u8();
12407        __struct.delta_yaw = buf.get_f32_le();
12408        __struct.delta_yaw_velocity = buf.get_f32_le();
12409        __struct.gimbal_device_id = buf.get_u8();
12410        Ok(__struct)
12411    }
12412    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12413        let mut __tmp = BytesMut::new(bytes);
12414        #[allow(clippy::absurd_extreme_comparisons)]
12415        #[allow(unused_comparisons)]
12416        if __tmp.remaining() < Self::ENCODED_LEN {
12417            panic!(
12418                "buffer is too small (need {} bytes, but got {})",
12419                Self::ENCODED_LEN,
12420                __tmp.remaining(),
12421            )
12422        }
12423        __tmp.put_u32_le(self.time_boot_ms);
12424        for val in &self.q {
12425            __tmp.put_f32_le(*val);
12426        }
12427        __tmp.put_f32_le(self.angular_velocity_x);
12428        __tmp.put_f32_le(self.angular_velocity_y);
12429        __tmp.put_f32_le(self.angular_velocity_z);
12430        __tmp.put_u32_le(self.failure_flags.bits());
12431        __tmp.put_u16_le(self.flags.bits());
12432        __tmp.put_u8(self.target_system);
12433        __tmp.put_u8(self.target_component);
12434        if matches!(version, MavlinkVersion::V2) {
12435            __tmp.put_f32_le(self.delta_yaw);
12436            __tmp.put_f32_le(self.delta_yaw_velocity);
12437            __tmp.put_u8(self.gimbal_device_id);
12438            let len = __tmp.len();
12439            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12440        } else {
12441            __tmp.len()
12442        }
12443    }
12444}
12445#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
12446#[doc = ""]
12447#[doc = "ID: 283"]
12448#[derive(Debug, Clone, PartialEq)]
12449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12450#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12451#[cfg_attr(feature = "ts", derive(TS))]
12452#[cfg_attr(feature = "ts", ts(export))]
12453pub struct GIMBAL_DEVICE_INFORMATION_DATA {
12454    #[doc = "UID of gimbal hardware (0 if unknown)."]
12455    pub uid: u64,
12456    #[doc = "Timestamp (time since system boot)."]
12457    pub time_boot_ms: u32,
12458    #[doc = "0xff)."]
12459    pub firmware_version: u32,
12460    #[doc = "0xff)."]
12461    pub hardware_version: u32,
12462    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12463    pub roll_min: f32,
12464    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12465    pub roll_max: f32,
12466    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12467    pub pitch_min: f32,
12468    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12469    pub pitch_max: f32,
12470    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12471    pub yaw_min: f32,
12472    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12473    pub yaw_max: f32,
12474    #[doc = "Bitmap of gimbal capability flags."]
12475    pub cap_flags: GimbalDeviceCapFlags,
12476    #[doc = "Bitmap for use for gimbal-specific capability flags."]
12477    pub custom_cap_flags: u16,
12478    #[doc = "Name of the gimbal vendor."]
12479    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12480    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12481    pub vendor_name: [u8; 32],
12482    #[doc = "Name of the gimbal model."]
12483    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12484    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12485    pub model_name: [u8; 32],
12486    #[doc = "Custom name of the gimbal given to it by the user."]
12487    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12488    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12489    pub custom_name: [u8; 32],
12490    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12491    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12492    pub gimbal_device_id: u8,
12493}
12494impl GIMBAL_DEVICE_INFORMATION_DATA {
12495    pub const ENCODED_LEN: usize = 145usize;
12496    pub const DEFAULT: Self = Self {
12497        uid: 0_u64,
12498        time_boot_ms: 0_u32,
12499        firmware_version: 0_u32,
12500        hardware_version: 0_u32,
12501        roll_min: 0.0_f32,
12502        roll_max: 0.0_f32,
12503        pitch_min: 0.0_f32,
12504        pitch_max: 0.0_f32,
12505        yaw_min: 0.0_f32,
12506        yaw_max: 0.0_f32,
12507        cap_flags: GimbalDeviceCapFlags::DEFAULT,
12508        custom_cap_flags: 0_u16,
12509        vendor_name: [0_u8; 32usize],
12510        model_name: [0_u8; 32usize],
12511        custom_name: [0_u8; 32usize],
12512        gimbal_device_id: 0_u8,
12513    };
12514    #[cfg(feature = "arbitrary")]
12515    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12516        use arbitrary::{Arbitrary, Unstructured};
12517        let mut buf = [0u8; 1024];
12518        rng.fill_bytes(&mut buf);
12519        let mut unstructured = Unstructured::new(&buf);
12520        Self::arbitrary(&mut unstructured).unwrap_or_default()
12521    }
12522}
12523impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
12524    fn default() -> Self {
12525        Self::DEFAULT.clone()
12526    }
12527}
12528impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
12529    type Message = MavMessage;
12530    const ID: u32 = 283u32;
12531    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
12532    const EXTRA_CRC: u8 = 74u8;
12533    const ENCODED_LEN: usize = 145usize;
12534    fn deser(
12535        _version: MavlinkVersion,
12536        __input: &[u8],
12537    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12538        let avail_len = __input.len();
12539        let mut payload_buf = [0; Self::ENCODED_LEN];
12540        let mut buf = if avail_len < Self::ENCODED_LEN {
12541            payload_buf[0..avail_len].copy_from_slice(__input);
12542            Bytes::new(&payload_buf)
12543        } else {
12544            Bytes::new(__input)
12545        };
12546        let mut __struct = Self::default();
12547        __struct.uid = buf.get_u64_le();
12548        __struct.time_boot_ms = buf.get_u32_le();
12549        __struct.firmware_version = buf.get_u32_le();
12550        __struct.hardware_version = buf.get_u32_le();
12551        __struct.roll_min = buf.get_f32_le();
12552        __struct.roll_max = buf.get_f32_le();
12553        __struct.pitch_min = buf.get_f32_le();
12554        __struct.pitch_max = buf.get_f32_le();
12555        __struct.yaw_min = buf.get_f32_le();
12556        __struct.yaw_max = buf.get_f32_le();
12557        let tmp = buf.get_u16_le();
12558        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
12559            tmp & GimbalDeviceCapFlags::all().bits(),
12560        )
12561        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12562            flag_type: "GimbalDeviceCapFlags",
12563            value: tmp as u32,
12564        })?;
12565        __struct.custom_cap_flags = buf.get_u16_le();
12566        for v in &mut __struct.vendor_name {
12567            let val = buf.get_u8();
12568            *v = val;
12569        }
12570        for v in &mut __struct.model_name {
12571            let val = buf.get_u8();
12572            *v = val;
12573        }
12574        for v in &mut __struct.custom_name {
12575            let val = buf.get_u8();
12576            *v = val;
12577        }
12578        __struct.gimbal_device_id = buf.get_u8();
12579        Ok(__struct)
12580    }
12581    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12582        let mut __tmp = BytesMut::new(bytes);
12583        #[allow(clippy::absurd_extreme_comparisons)]
12584        #[allow(unused_comparisons)]
12585        if __tmp.remaining() < Self::ENCODED_LEN {
12586            panic!(
12587                "buffer is too small (need {} bytes, but got {})",
12588                Self::ENCODED_LEN,
12589                __tmp.remaining(),
12590            )
12591        }
12592        __tmp.put_u64_le(self.uid);
12593        __tmp.put_u32_le(self.time_boot_ms);
12594        __tmp.put_u32_le(self.firmware_version);
12595        __tmp.put_u32_le(self.hardware_version);
12596        __tmp.put_f32_le(self.roll_min);
12597        __tmp.put_f32_le(self.roll_max);
12598        __tmp.put_f32_le(self.pitch_min);
12599        __tmp.put_f32_le(self.pitch_max);
12600        __tmp.put_f32_le(self.yaw_min);
12601        __tmp.put_f32_le(self.yaw_max);
12602        __tmp.put_u16_le(self.cap_flags.bits());
12603        __tmp.put_u16_le(self.custom_cap_flags);
12604        for val in &self.vendor_name {
12605            __tmp.put_u8(*val);
12606        }
12607        for val in &self.model_name {
12608            __tmp.put_u8(*val);
12609        }
12610        for val in &self.custom_name {
12611            __tmp.put_u8(*val);
12612        }
12613        if matches!(version, MavlinkVersion::V2) {
12614            __tmp.put_u8(self.gimbal_device_id);
12615            let len = __tmp.len();
12616            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12617        } else {
12618            __tmp.len()
12619        }
12620    }
12621}
12622#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
12623#[doc = ""]
12624#[doc = "ID: 284"]
12625#[derive(Debug, Clone, PartialEq)]
12626#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12627#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12628#[cfg_attr(feature = "ts", derive(TS))]
12629#[cfg_attr(feature = "ts", ts(export))]
12630pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12631    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
12632    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12633    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12634    pub q: [f32; 4],
12635    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
12636    pub angular_velocity_x: f32,
12637    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
12638    pub angular_velocity_y: f32,
12639    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
12640    pub angular_velocity_z: f32,
12641    #[doc = "Low level gimbal flags."]
12642    pub flags: GimbalDeviceFlags,
12643    #[doc = "System ID"]
12644    pub target_system: u8,
12645    #[doc = "Component ID"]
12646    pub target_component: u8,
12647}
12648impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12649    pub const ENCODED_LEN: usize = 32usize;
12650    pub const DEFAULT: Self = Self {
12651        q: [0.0_f32; 4usize],
12652        angular_velocity_x: 0.0_f32,
12653        angular_velocity_y: 0.0_f32,
12654        angular_velocity_z: 0.0_f32,
12655        flags: GimbalDeviceFlags::DEFAULT,
12656        target_system: 0_u8,
12657        target_component: 0_u8,
12658    };
12659    #[cfg(feature = "arbitrary")]
12660    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12661        use arbitrary::{Arbitrary, Unstructured};
12662        let mut buf = [0u8; 1024];
12663        rng.fill_bytes(&mut buf);
12664        let mut unstructured = Unstructured::new(&buf);
12665        Self::arbitrary(&mut unstructured).unwrap_or_default()
12666    }
12667}
12668impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12669    fn default() -> Self {
12670        Self::DEFAULT.clone()
12671    }
12672}
12673impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12674    type Message = MavMessage;
12675    const ID: u32 = 284u32;
12676    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
12677    const EXTRA_CRC: u8 = 99u8;
12678    const ENCODED_LEN: usize = 32usize;
12679    fn deser(
12680        _version: MavlinkVersion,
12681        __input: &[u8],
12682    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12683        let avail_len = __input.len();
12684        let mut payload_buf = [0; Self::ENCODED_LEN];
12685        let mut buf = if avail_len < Self::ENCODED_LEN {
12686            payload_buf[0..avail_len].copy_from_slice(__input);
12687            Bytes::new(&payload_buf)
12688        } else {
12689            Bytes::new(__input)
12690        };
12691        let mut __struct = Self::default();
12692        for v in &mut __struct.q {
12693            let val = buf.get_f32_le();
12694            *v = val;
12695        }
12696        __struct.angular_velocity_x = buf.get_f32_le();
12697        __struct.angular_velocity_y = buf.get_f32_le();
12698        __struct.angular_velocity_z = buf.get_f32_le();
12699        let tmp = buf.get_u16_le();
12700        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
12701            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12702                flag_type: "GimbalDeviceFlags",
12703                value: tmp as u32,
12704            })?;
12705        __struct.target_system = buf.get_u8();
12706        __struct.target_component = buf.get_u8();
12707        Ok(__struct)
12708    }
12709    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12710        let mut __tmp = BytesMut::new(bytes);
12711        #[allow(clippy::absurd_extreme_comparisons)]
12712        #[allow(unused_comparisons)]
12713        if __tmp.remaining() < Self::ENCODED_LEN {
12714            panic!(
12715                "buffer is too small (need {} bytes, but got {})",
12716                Self::ENCODED_LEN,
12717                __tmp.remaining(),
12718            )
12719        }
12720        for val in &self.q {
12721            __tmp.put_f32_le(*val);
12722        }
12723        __tmp.put_f32_le(self.angular_velocity_x);
12724        __tmp.put_f32_le(self.angular_velocity_y);
12725        __tmp.put_f32_le(self.angular_velocity_z);
12726        __tmp.put_u16_le(self.flags.bits());
12727        __tmp.put_u8(self.target_system);
12728        __tmp.put_u8(self.target_component);
12729        if matches!(version, MavlinkVersion::V2) {
12730            let len = __tmp.len();
12731            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12732        } else {
12733            __tmp.len()
12734        }
12735    }
12736}
12737#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
12738#[doc = ""]
12739#[doc = "ID: 280"]
12740#[derive(Debug, Clone, PartialEq)]
12741#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12742#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12743#[cfg_attr(feature = "ts", derive(TS))]
12744#[cfg_attr(feature = "ts", ts(export))]
12745pub struct GIMBAL_MANAGER_INFORMATION_DATA {
12746    #[doc = "Timestamp (time since system boot)."]
12747    pub time_boot_ms: u32,
12748    #[doc = "Bitmap of gimbal capability flags."]
12749    pub cap_flags: GimbalManagerCapFlags,
12750    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12751    pub roll_min: f32,
12752    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12753    pub roll_max: f32,
12754    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
12755    pub pitch_min: f32,
12756    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
12757    pub pitch_max: f32,
12758    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
12759    pub yaw_min: f32,
12760    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
12761    pub yaw_max: f32,
12762    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
12763    pub gimbal_device_id: u8,
12764}
12765impl GIMBAL_MANAGER_INFORMATION_DATA {
12766    pub const ENCODED_LEN: usize = 33usize;
12767    pub const DEFAULT: Self = Self {
12768        time_boot_ms: 0_u32,
12769        cap_flags: GimbalManagerCapFlags::DEFAULT,
12770        roll_min: 0.0_f32,
12771        roll_max: 0.0_f32,
12772        pitch_min: 0.0_f32,
12773        pitch_max: 0.0_f32,
12774        yaw_min: 0.0_f32,
12775        yaw_max: 0.0_f32,
12776        gimbal_device_id: 0_u8,
12777    };
12778    #[cfg(feature = "arbitrary")]
12779    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12780        use arbitrary::{Arbitrary, Unstructured};
12781        let mut buf = [0u8; 1024];
12782        rng.fill_bytes(&mut buf);
12783        let mut unstructured = Unstructured::new(&buf);
12784        Self::arbitrary(&mut unstructured).unwrap_or_default()
12785    }
12786}
12787impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
12788    fn default() -> Self {
12789        Self::DEFAULT.clone()
12790    }
12791}
12792impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
12793    type Message = MavMessage;
12794    const ID: u32 = 280u32;
12795    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
12796    const EXTRA_CRC: u8 = 70u8;
12797    const ENCODED_LEN: usize = 33usize;
12798    fn deser(
12799        _version: MavlinkVersion,
12800        __input: &[u8],
12801    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12802        let avail_len = __input.len();
12803        let mut payload_buf = [0; Self::ENCODED_LEN];
12804        let mut buf = if avail_len < Self::ENCODED_LEN {
12805            payload_buf[0..avail_len].copy_from_slice(__input);
12806            Bytes::new(&payload_buf)
12807        } else {
12808            Bytes::new(__input)
12809        };
12810        let mut __struct = Self::default();
12811        __struct.time_boot_ms = buf.get_u32_le();
12812        let tmp = buf.get_u32_le();
12813        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
12814            tmp & GimbalManagerCapFlags::all().bits(),
12815        )
12816        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12817            flag_type: "GimbalManagerCapFlags",
12818            value: tmp as u32,
12819        })?;
12820        __struct.roll_min = buf.get_f32_le();
12821        __struct.roll_max = buf.get_f32_le();
12822        __struct.pitch_min = buf.get_f32_le();
12823        __struct.pitch_max = buf.get_f32_le();
12824        __struct.yaw_min = buf.get_f32_le();
12825        __struct.yaw_max = buf.get_f32_le();
12826        __struct.gimbal_device_id = buf.get_u8();
12827        Ok(__struct)
12828    }
12829    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12830        let mut __tmp = BytesMut::new(bytes);
12831        #[allow(clippy::absurd_extreme_comparisons)]
12832        #[allow(unused_comparisons)]
12833        if __tmp.remaining() < Self::ENCODED_LEN {
12834            panic!(
12835                "buffer is too small (need {} bytes, but got {})",
12836                Self::ENCODED_LEN,
12837                __tmp.remaining(),
12838            )
12839        }
12840        __tmp.put_u32_le(self.time_boot_ms);
12841        __tmp.put_u32_le(self.cap_flags.bits());
12842        __tmp.put_f32_le(self.roll_min);
12843        __tmp.put_f32_le(self.roll_max);
12844        __tmp.put_f32_le(self.pitch_min);
12845        __tmp.put_f32_le(self.pitch_max);
12846        __tmp.put_f32_le(self.yaw_min);
12847        __tmp.put_f32_le(self.yaw_max);
12848        __tmp.put_u8(self.gimbal_device_id);
12849        if matches!(version, MavlinkVersion::V2) {
12850            let len = __tmp.len();
12851            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12852        } else {
12853            __tmp.len()
12854        }
12855    }
12856}
12857#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
12858#[doc = ""]
12859#[doc = "ID: 282"]
12860#[derive(Debug, Clone, PartialEq)]
12861#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12862#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12863#[cfg_attr(feature = "ts", derive(TS))]
12864#[cfg_attr(feature = "ts", ts(export))]
12865pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12866    #[doc = "High level gimbal manager flags to use."]
12867    pub flags: GimbalManagerFlags,
12868    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
12869    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12870    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12871    pub q: [f32; 4],
12872    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
12873    pub angular_velocity_x: f32,
12874    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
12875    pub angular_velocity_y: f32,
12876    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
12877    pub angular_velocity_z: f32,
12878    #[doc = "System ID"]
12879    pub target_system: u8,
12880    #[doc = "Component ID"]
12881    pub target_component: u8,
12882    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12883    pub gimbal_device_id: u8,
12884}
12885impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12886    pub const ENCODED_LEN: usize = 35usize;
12887    pub const DEFAULT: Self = Self {
12888        flags: GimbalManagerFlags::DEFAULT,
12889        q: [0.0_f32; 4usize],
12890        angular_velocity_x: 0.0_f32,
12891        angular_velocity_y: 0.0_f32,
12892        angular_velocity_z: 0.0_f32,
12893        target_system: 0_u8,
12894        target_component: 0_u8,
12895        gimbal_device_id: 0_u8,
12896    };
12897    #[cfg(feature = "arbitrary")]
12898    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12899        use arbitrary::{Arbitrary, Unstructured};
12900        let mut buf = [0u8; 1024];
12901        rng.fill_bytes(&mut buf);
12902        let mut unstructured = Unstructured::new(&buf);
12903        Self::arbitrary(&mut unstructured).unwrap_or_default()
12904    }
12905}
12906impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12907    fn default() -> Self {
12908        Self::DEFAULT.clone()
12909    }
12910}
12911impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12912    type Message = MavMessage;
12913    const ID: u32 = 282u32;
12914    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
12915    const EXTRA_CRC: u8 = 123u8;
12916    const ENCODED_LEN: usize = 35usize;
12917    fn deser(
12918        _version: MavlinkVersion,
12919        __input: &[u8],
12920    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12921        let avail_len = __input.len();
12922        let mut payload_buf = [0; Self::ENCODED_LEN];
12923        let mut buf = if avail_len < Self::ENCODED_LEN {
12924            payload_buf[0..avail_len].copy_from_slice(__input);
12925            Bytes::new(&payload_buf)
12926        } else {
12927            Bytes::new(__input)
12928        };
12929        let mut __struct = Self::default();
12930        let tmp = buf.get_u32_le();
12931        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
12932            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12933                flag_type: "GimbalManagerFlags",
12934                value: tmp as u32,
12935            })?;
12936        for v in &mut __struct.q {
12937            let val = buf.get_f32_le();
12938            *v = val;
12939        }
12940        __struct.angular_velocity_x = buf.get_f32_le();
12941        __struct.angular_velocity_y = buf.get_f32_le();
12942        __struct.angular_velocity_z = buf.get_f32_le();
12943        __struct.target_system = buf.get_u8();
12944        __struct.target_component = buf.get_u8();
12945        __struct.gimbal_device_id = buf.get_u8();
12946        Ok(__struct)
12947    }
12948    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12949        let mut __tmp = BytesMut::new(bytes);
12950        #[allow(clippy::absurd_extreme_comparisons)]
12951        #[allow(unused_comparisons)]
12952        if __tmp.remaining() < Self::ENCODED_LEN {
12953            panic!(
12954                "buffer is too small (need {} bytes, but got {})",
12955                Self::ENCODED_LEN,
12956                __tmp.remaining(),
12957            )
12958        }
12959        __tmp.put_u32_le(self.flags.bits());
12960        for val in &self.q {
12961            __tmp.put_f32_le(*val);
12962        }
12963        __tmp.put_f32_le(self.angular_velocity_x);
12964        __tmp.put_f32_le(self.angular_velocity_y);
12965        __tmp.put_f32_le(self.angular_velocity_z);
12966        __tmp.put_u8(self.target_system);
12967        __tmp.put_u8(self.target_component);
12968        __tmp.put_u8(self.gimbal_device_id);
12969        if matches!(version, MavlinkVersion::V2) {
12970            let len = __tmp.len();
12971            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12972        } else {
12973            __tmp.len()
12974        }
12975    }
12976}
12977#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
12978#[doc = ""]
12979#[doc = "ID: 288"]
12980#[derive(Debug, Clone, PartialEq)]
12981#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12982#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12983#[cfg_attr(feature = "ts", derive(TS))]
12984#[cfg_attr(feature = "ts", ts(export))]
12985pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12986    #[doc = "High level gimbal manager flags."]
12987    pub flags: GimbalManagerFlags,
12988    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
12989    pub pitch: f32,
12990    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
12991    pub yaw: f32,
12992    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
12993    pub pitch_rate: f32,
12994    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
12995    pub yaw_rate: f32,
12996    #[doc = "System ID"]
12997    pub target_system: u8,
12998    #[doc = "Component ID"]
12999    pub target_component: u8,
13000    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13001    pub gimbal_device_id: u8,
13002}
13003impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13004    pub const ENCODED_LEN: usize = 23usize;
13005    pub const DEFAULT: Self = Self {
13006        flags: GimbalManagerFlags::DEFAULT,
13007        pitch: 0.0_f32,
13008        yaw: 0.0_f32,
13009        pitch_rate: 0.0_f32,
13010        yaw_rate: 0.0_f32,
13011        target_system: 0_u8,
13012        target_component: 0_u8,
13013        gimbal_device_id: 0_u8,
13014    };
13015    #[cfg(feature = "arbitrary")]
13016    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13017        use arbitrary::{Arbitrary, Unstructured};
13018        let mut buf = [0u8; 1024];
13019        rng.fill_bytes(&mut buf);
13020        let mut unstructured = Unstructured::new(&buf);
13021        Self::arbitrary(&mut unstructured).unwrap_or_default()
13022    }
13023}
13024impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13025    fn default() -> Self {
13026        Self::DEFAULT.clone()
13027    }
13028}
13029impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13030    type Message = MavMessage;
13031    const ID: u32 = 288u32;
13032    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
13033    const EXTRA_CRC: u8 = 20u8;
13034    const ENCODED_LEN: usize = 23usize;
13035    fn deser(
13036        _version: MavlinkVersion,
13037        __input: &[u8],
13038    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13039        let avail_len = __input.len();
13040        let mut payload_buf = [0; Self::ENCODED_LEN];
13041        let mut buf = if avail_len < Self::ENCODED_LEN {
13042            payload_buf[0..avail_len].copy_from_slice(__input);
13043            Bytes::new(&payload_buf)
13044        } else {
13045            Bytes::new(__input)
13046        };
13047        let mut __struct = Self::default();
13048        let tmp = buf.get_u32_le();
13049        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13050            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13051                flag_type: "GimbalManagerFlags",
13052                value: tmp as u32,
13053            })?;
13054        __struct.pitch = buf.get_f32_le();
13055        __struct.yaw = buf.get_f32_le();
13056        __struct.pitch_rate = buf.get_f32_le();
13057        __struct.yaw_rate = buf.get_f32_le();
13058        __struct.target_system = buf.get_u8();
13059        __struct.target_component = buf.get_u8();
13060        __struct.gimbal_device_id = buf.get_u8();
13061        Ok(__struct)
13062    }
13063    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13064        let mut __tmp = BytesMut::new(bytes);
13065        #[allow(clippy::absurd_extreme_comparisons)]
13066        #[allow(unused_comparisons)]
13067        if __tmp.remaining() < Self::ENCODED_LEN {
13068            panic!(
13069                "buffer is too small (need {} bytes, but got {})",
13070                Self::ENCODED_LEN,
13071                __tmp.remaining(),
13072            )
13073        }
13074        __tmp.put_u32_le(self.flags.bits());
13075        __tmp.put_f32_le(self.pitch);
13076        __tmp.put_f32_le(self.yaw);
13077        __tmp.put_f32_le(self.pitch_rate);
13078        __tmp.put_f32_le(self.yaw_rate);
13079        __tmp.put_u8(self.target_system);
13080        __tmp.put_u8(self.target_component);
13081        __tmp.put_u8(self.gimbal_device_id);
13082        if matches!(version, MavlinkVersion::V2) {
13083            let len = __tmp.len();
13084            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13085        } else {
13086            __tmp.len()
13087        }
13088    }
13089}
13090#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13091#[doc = ""]
13092#[doc = "ID: 287"]
13093#[derive(Debug, Clone, PartialEq)]
13094#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13095#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13096#[cfg_attr(feature = "ts", derive(TS))]
13097#[cfg_attr(feature = "ts", ts(export))]
13098pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13099    #[doc = "High level gimbal manager flags to use."]
13100    pub flags: GimbalManagerFlags,
13101    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13102    pub pitch: f32,
13103    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13104    pub yaw: f32,
13105    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13106    pub pitch_rate: f32,
13107    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13108    pub yaw_rate: f32,
13109    #[doc = "System ID"]
13110    pub target_system: u8,
13111    #[doc = "Component ID"]
13112    pub target_component: u8,
13113    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13114    pub gimbal_device_id: u8,
13115}
13116impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13117    pub const ENCODED_LEN: usize = 23usize;
13118    pub const DEFAULT: Self = Self {
13119        flags: GimbalManagerFlags::DEFAULT,
13120        pitch: 0.0_f32,
13121        yaw: 0.0_f32,
13122        pitch_rate: 0.0_f32,
13123        yaw_rate: 0.0_f32,
13124        target_system: 0_u8,
13125        target_component: 0_u8,
13126        gimbal_device_id: 0_u8,
13127    };
13128    #[cfg(feature = "arbitrary")]
13129    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13130        use arbitrary::{Arbitrary, Unstructured};
13131        let mut buf = [0u8; 1024];
13132        rng.fill_bytes(&mut buf);
13133        let mut unstructured = Unstructured::new(&buf);
13134        Self::arbitrary(&mut unstructured).unwrap_or_default()
13135    }
13136}
13137impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13138    fn default() -> Self {
13139        Self::DEFAULT.clone()
13140    }
13141}
13142impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13143    type Message = MavMessage;
13144    const ID: u32 = 287u32;
13145    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
13146    const EXTRA_CRC: u8 = 1u8;
13147    const ENCODED_LEN: usize = 23usize;
13148    fn deser(
13149        _version: MavlinkVersion,
13150        __input: &[u8],
13151    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13152        let avail_len = __input.len();
13153        let mut payload_buf = [0; Self::ENCODED_LEN];
13154        let mut buf = if avail_len < Self::ENCODED_LEN {
13155            payload_buf[0..avail_len].copy_from_slice(__input);
13156            Bytes::new(&payload_buf)
13157        } else {
13158            Bytes::new(__input)
13159        };
13160        let mut __struct = Self::default();
13161        let tmp = buf.get_u32_le();
13162        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13163            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13164                flag_type: "GimbalManagerFlags",
13165                value: tmp as u32,
13166            })?;
13167        __struct.pitch = buf.get_f32_le();
13168        __struct.yaw = buf.get_f32_le();
13169        __struct.pitch_rate = buf.get_f32_le();
13170        __struct.yaw_rate = buf.get_f32_le();
13171        __struct.target_system = buf.get_u8();
13172        __struct.target_component = buf.get_u8();
13173        __struct.gimbal_device_id = buf.get_u8();
13174        Ok(__struct)
13175    }
13176    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13177        let mut __tmp = BytesMut::new(bytes);
13178        #[allow(clippy::absurd_extreme_comparisons)]
13179        #[allow(unused_comparisons)]
13180        if __tmp.remaining() < Self::ENCODED_LEN {
13181            panic!(
13182                "buffer is too small (need {} bytes, but got {})",
13183                Self::ENCODED_LEN,
13184                __tmp.remaining(),
13185            )
13186        }
13187        __tmp.put_u32_le(self.flags.bits());
13188        __tmp.put_f32_le(self.pitch);
13189        __tmp.put_f32_le(self.yaw);
13190        __tmp.put_f32_le(self.pitch_rate);
13191        __tmp.put_f32_le(self.yaw_rate);
13192        __tmp.put_u8(self.target_system);
13193        __tmp.put_u8(self.target_component);
13194        __tmp.put_u8(self.gimbal_device_id);
13195        if matches!(version, MavlinkVersion::V2) {
13196            let len = __tmp.len();
13197            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13198        } else {
13199            __tmp.len()
13200        }
13201    }
13202}
13203#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
13204#[doc = ""]
13205#[doc = "ID: 281"]
13206#[derive(Debug, Clone, PartialEq)]
13207#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13209#[cfg_attr(feature = "ts", derive(TS))]
13210#[cfg_attr(feature = "ts", ts(export))]
13211pub struct GIMBAL_MANAGER_STATUS_DATA {
13212    #[doc = "Timestamp (time since system boot)."]
13213    pub time_boot_ms: u32,
13214    #[doc = "High level gimbal manager flags currently applied."]
13215    pub flags: GimbalManagerFlags,
13216    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13217    pub gimbal_device_id: u8,
13218    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
13219    pub primary_control_sysid: u8,
13220    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
13221    pub primary_control_compid: u8,
13222    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
13223    pub secondary_control_sysid: u8,
13224    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
13225    pub secondary_control_compid: u8,
13226}
13227impl GIMBAL_MANAGER_STATUS_DATA {
13228    pub const ENCODED_LEN: usize = 13usize;
13229    pub const DEFAULT: Self = Self {
13230        time_boot_ms: 0_u32,
13231        flags: GimbalManagerFlags::DEFAULT,
13232        gimbal_device_id: 0_u8,
13233        primary_control_sysid: 0_u8,
13234        primary_control_compid: 0_u8,
13235        secondary_control_sysid: 0_u8,
13236        secondary_control_compid: 0_u8,
13237    };
13238    #[cfg(feature = "arbitrary")]
13239    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13240        use arbitrary::{Arbitrary, Unstructured};
13241        let mut buf = [0u8; 1024];
13242        rng.fill_bytes(&mut buf);
13243        let mut unstructured = Unstructured::new(&buf);
13244        Self::arbitrary(&mut unstructured).unwrap_or_default()
13245    }
13246}
13247impl Default for GIMBAL_MANAGER_STATUS_DATA {
13248    fn default() -> Self {
13249        Self::DEFAULT.clone()
13250    }
13251}
13252impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
13253    type Message = MavMessage;
13254    const ID: u32 = 281u32;
13255    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
13256    const EXTRA_CRC: u8 = 48u8;
13257    const ENCODED_LEN: usize = 13usize;
13258    fn deser(
13259        _version: MavlinkVersion,
13260        __input: &[u8],
13261    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13262        let avail_len = __input.len();
13263        let mut payload_buf = [0; Self::ENCODED_LEN];
13264        let mut buf = if avail_len < Self::ENCODED_LEN {
13265            payload_buf[0..avail_len].copy_from_slice(__input);
13266            Bytes::new(&payload_buf)
13267        } else {
13268            Bytes::new(__input)
13269        };
13270        let mut __struct = Self::default();
13271        __struct.time_boot_ms = buf.get_u32_le();
13272        let tmp = buf.get_u32_le();
13273        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13274            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13275                flag_type: "GimbalManagerFlags",
13276                value: tmp as u32,
13277            })?;
13278        __struct.gimbal_device_id = buf.get_u8();
13279        __struct.primary_control_sysid = buf.get_u8();
13280        __struct.primary_control_compid = buf.get_u8();
13281        __struct.secondary_control_sysid = buf.get_u8();
13282        __struct.secondary_control_compid = buf.get_u8();
13283        Ok(__struct)
13284    }
13285    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13286        let mut __tmp = BytesMut::new(bytes);
13287        #[allow(clippy::absurd_extreme_comparisons)]
13288        #[allow(unused_comparisons)]
13289        if __tmp.remaining() < Self::ENCODED_LEN {
13290            panic!(
13291                "buffer is too small (need {} bytes, but got {})",
13292                Self::ENCODED_LEN,
13293                __tmp.remaining(),
13294            )
13295        }
13296        __tmp.put_u32_le(self.time_boot_ms);
13297        __tmp.put_u32_le(self.flags.bits());
13298        __tmp.put_u8(self.gimbal_device_id);
13299        __tmp.put_u8(self.primary_control_sysid);
13300        __tmp.put_u8(self.primary_control_compid);
13301        __tmp.put_u8(self.secondary_control_sysid);
13302        __tmp.put_u8(self.secondary_control_compid);
13303        if matches!(version, MavlinkVersion::V2) {
13304            let len = __tmp.len();
13305            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13306        } else {
13307            __tmp.len()
13308        }
13309    }
13310}
13311#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
13312#[doc = ""]
13313#[doc = "ID: 33"]
13314#[derive(Debug, Clone, PartialEq)]
13315#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13316#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13317#[cfg_attr(feature = "ts", derive(TS))]
13318#[cfg_attr(feature = "ts", ts(export))]
13319pub struct GLOBAL_POSITION_INT_DATA {
13320    #[doc = "Timestamp (time since system boot)."]
13321    pub time_boot_ms: u32,
13322    #[doc = "Latitude, expressed"]
13323    pub lat: i32,
13324    #[doc = "Longitude, expressed"]
13325    pub lon: i32,
13326    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
13327    pub alt: i32,
13328    #[doc = "Altitude above home"]
13329    pub relative_alt: i32,
13330    #[doc = "Ground X Speed (Latitude, positive north)"]
13331    pub vx: i16,
13332    #[doc = "Ground Y Speed (Longitude, positive east)"]
13333    pub vy: i16,
13334    #[doc = "Ground Z Speed (Altitude, positive down)"]
13335    pub vz: i16,
13336    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13337    pub hdg: u16,
13338}
13339impl GLOBAL_POSITION_INT_DATA {
13340    pub const ENCODED_LEN: usize = 28usize;
13341    pub const DEFAULT: Self = Self {
13342        time_boot_ms: 0_u32,
13343        lat: 0_i32,
13344        lon: 0_i32,
13345        alt: 0_i32,
13346        relative_alt: 0_i32,
13347        vx: 0_i16,
13348        vy: 0_i16,
13349        vz: 0_i16,
13350        hdg: 0_u16,
13351    };
13352    #[cfg(feature = "arbitrary")]
13353    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13354        use arbitrary::{Arbitrary, Unstructured};
13355        let mut buf = [0u8; 1024];
13356        rng.fill_bytes(&mut buf);
13357        let mut unstructured = Unstructured::new(&buf);
13358        Self::arbitrary(&mut unstructured).unwrap_or_default()
13359    }
13360}
13361impl Default for GLOBAL_POSITION_INT_DATA {
13362    fn default() -> Self {
13363        Self::DEFAULT.clone()
13364    }
13365}
13366impl MessageData for GLOBAL_POSITION_INT_DATA {
13367    type Message = MavMessage;
13368    const ID: u32 = 33u32;
13369    const NAME: &'static str = "GLOBAL_POSITION_INT";
13370    const EXTRA_CRC: u8 = 104u8;
13371    const ENCODED_LEN: usize = 28usize;
13372    fn deser(
13373        _version: MavlinkVersion,
13374        __input: &[u8],
13375    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13376        let avail_len = __input.len();
13377        let mut payload_buf = [0; Self::ENCODED_LEN];
13378        let mut buf = if avail_len < Self::ENCODED_LEN {
13379            payload_buf[0..avail_len].copy_from_slice(__input);
13380            Bytes::new(&payload_buf)
13381        } else {
13382            Bytes::new(__input)
13383        };
13384        let mut __struct = Self::default();
13385        __struct.time_boot_ms = buf.get_u32_le();
13386        __struct.lat = buf.get_i32_le();
13387        __struct.lon = buf.get_i32_le();
13388        __struct.alt = buf.get_i32_le();
13389        __struct.relative_alt = buf.get_i32_le();
13390        __struct.vx = buf.get_i16_le();
13391        __struct.vy = buf.get_i16_le();
13392        __struct.vz = buf.get_i16_le();
13393        __struct.hdg = buf.get_u16_le();
13394        Ok(__struct)
13395    }
13396    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13397        let mut __tmp = BytesMut::new(bytes);
13398        #[allow(clippy::absurd_extreme_comparisons)]
13399        #[allow(unused_comparisons)]
13400        if __tmp.remaining() < Self::ENCODED_LEN {
13401            panic!(
13402                "buffer is too small (need {} bytes, but got {})",
13403                Self::ENCODED_LEN,
13404                __tmp.remaining(),
13405            )
13406        }
13407        __tmp.put_u32_le(self.time_boot_ms);
13408        __tmp.put_i32_le(self.lat);
13409        __tmp.put_i32_le(self.lon);
13410        __tmp.put_i32_le(self.alt);
13411        __tmp.put_i32_le(self.relative_alt);
13412        __tmp.put_i16_le(self.vx);
13413        __tmp.put_i16_le(self.vy);
13414        __tmp.put_i16_le(self.vz);
13415        __tmp.put_u16_le(self.hdg);
13416        if matches!(version, MavlinkVersion::V2) {
13417            let len = __tmp.len();
13418            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13419        } else {
13420            __tmp.len()
13421        }
13422    }
13423}
13424#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
13425#[doc = ""]
13426#[doc = "ID: 63"]
13427#[derive(Debug, Clone, PartialEq)]
13428#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13429#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13430#[cfg_attr(feature = "ts", derive(TS))]
13431#[cfg_attr(feature = "ts", ts(export))]
13432pub struct GLOBAL_POSITION_INT_COV_DATA {
13433    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13434    pub time_usec: u64,
13435    #[doc = "Latitude"]
13436    pub lat: i32,
13437    #[doc = "Longitude"]
13438    pub lon: i32,
13439    #[doc = "Altitude in meters above MSL"]
13440    pub alt: i32,
13441    #[doc = "Altitude above ground"]
13442    pub relative_alt: i32,
13443    #[doc = "Ground X Speed (Latitude)"]
13444    pub vx: f32,
13445    #[doc = "Ground Y Speed (Longitude)"]
13446    pub vy: f32,
13447    #[doc = "Ground Z Speed (Altitude)"]
13448    pub vz: f32,
13449    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
13450    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13451    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13452    pub covariance: [f32; 36],
13453    #[doc = "Class id of the estimator this estimate originated from."]
13454    pub estimator_type: MavEstimatorType,
13455}
13456impl GLOBAL_POSITION_INT_COV_DATA {
13457    pub const ENCODED_LEN: usize = 181usize;
13458    pub const DEFAULT: Self = Self {
13459        time_usec: 0_u64,
13460        lat: 0_i32,
13461        lon: 0_i32,
13462        alt: 0_i32,
13463        relative_alt: 0_i32,
13464        vx: 0.0_f32,
13465        vy: 0.0_f32,
13466        vz: 0.0_f32,
13467        covariance: [0.0_f32; 36usize],
13468        estimator_type: MavEstimatorType::DEFAULT,
13469    };
13470    #[cfg(feature = "arbitrary")]
13471    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13472        use arbitrary::{Arbitrary, Unstructured};
13473        let mut buf = [0u8; 1024];
13474        rng.fill_bytes(&mut buf);
13475        let mut unstructured = Unstructured::new(&buf);
13476        Self::arbitrary(&mut unstructured).unwrap_or_default()
13477    }
13478}
13479impl Default for GLOBAL_POSITION_INT_COV_DATA {
13480    fn default() -> Self {
13481        Self::DEFAULT.clone()
13482    }
13483}
13484impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
13485    type Message = MavMessage;
13486    const ID: u32 = 63u32;
13487    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
13488    const EXTRA_CRC: u8 = 119u8;
13489    const ENCODED_LEN: usize = 181usize;
13490    fn deser(
13491        _version: MavlinkVersion,
13492        __input: &[u8],
13493    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13494        let avail_len = __input.len();
13495        let mut payload_buf = [0; Self::ENCODED_LEN];
13496        let mut buf = if avail_len < Self::ENCODED_LEN {
13497            payload_buf[0..avail_len].copy_from_slice(__input);
13498            Bytes::new(&payload_buf)
13499        } else {
13500            Bytes::new(__input)
13501        };
13502        let mut __struct = Self::default();
13503        __struct.time_usec = buf.get_u64_le();
13504        __struct.lat = buf.get_i32_le();
13505        __struct.lon = buf.get_i32_le();
13506        __struct.alt = buf.get_i32_le();
13507        __struct.relative_alt = buf.get_i32_le();
13508        __struct.vx = buf.get_f32_le();
13509        __struct.vy = buf.get_f32_le();
13510        __struct.vz = buf.get_f32_le();
13511        for v in &mut __struct.covariance {
13512            let val = buf.get_f32_le();
13513            *v = val;
13514        }
13515        let tmp = buf.get_u8();
13516        __struct.estimator_type =
13517            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13518                enum_type: "MavEstimatorType",
13519                value: tmp as u32,
13520            })?;
13521        Ok(__struct)
13522    }
13523    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13524        let mut __tmp = BytesMut::new(bytes);
13525        #[allow(clippy::absurd_extreme_comparisons)]
13526        #[allow(unused_comparisons)]
13527        if __tmp.remaining() < Self::ENCODED_LEN {
13528            panic!(
13529                "buffer is too small (need {} bytes, but got {})",
13530                Self::ENCODED_LEN,
13531                __tmp.remaining(),
13532            )
13533        }
13534        __tmp.put_u64_le(self.time_usec);
13535        __tmp.put_i32_le(self.lat);
13536        __tmp.put_i32_le(self.lon);
13537        __tmp.put_i32_le(self.alt);
13538        __tmp.put_i32_le(self.relative_alt);
13539        __tmp.put_f32_le(self.vx);
13540        __tmp.put_f32_le(self.vy);
13541        __tmp.put_f32_le(self.vz);
13542        for val in &self.covariance {
13543            __tmp.put_f32_le(*val);
13544        }
13545        __tmp.put_u8(self.estimator_type as u8);
13546        if matches!(version, MavlinkVersion::V2) {
13547            let len = __tmp.len();
13548            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13549        } else {
13550            __tmp.len()
13551        }
13552    }
13553}
13554#[doc = "Global position/attitude estimate from a vision source."]
13555#[doc = ""]
13556#[doc = "ID: 101"]
13557#[derive(Debug, Clone, PartialEq)]
13558#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13559#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13560#[cfg_attr(feature = "ts", derive(TS))]
13561#[cfg_attr(feature = "ts", ts(export))]
13562pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13563    #[doc = "Timestamp (UNIX time or since system boot)"]
13564    pub usec: u64,
13565    #[doc = "Global X position"]
13566    pub x: f32,
13567    #[doc = "Global Y position"]
13568    pub y: f32,
13569    #[doc = "Global Z position"]
13570    pub z: f32,
13571    #[doc = "Roll angle"]
13572    pub roll: f32,
13573    #[doc = "Pitch angle"]
13574    pub pitch: f32,
13575    #[doc = "Yaw angle"]
13576    pub yaw: f32,
13577    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
13578    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13579    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13580    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13581    pub covariance: [f32; 21],
13582    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
13583    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13584    pub reset_counter: u8,
13585}
13586impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13587    pub const ENCODED_LEN: usize = 117usize;
13588    pub const DEFAULT: Self = Self {
13589        usec: 0_u64,
13590        x: 0.0_f32,
13591        y: 0.0_f32,
13592        z: 0.0_f32,
13593        roll: 0.0_f32,
13594        pitch: 0.0_f32,
13595        yaw: 0.0_f32,
13596        covariance: [0.0_f32; 21usize],
13597        reset_counter: 0_u8,
13598    };
13599    #[cfg(feature = "arbitrary")]
13600    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13601        use arbitrary::{Arbitrary, Unstructured};
13602        let mut buf = [0u8; 1024];
13603        rng.fill_bytes(&mut buf);
13604        let mut unstructured = Unstructured::new(&buf);
13605        Self::arbitrary(&mut unstructured).unwrap_or_default()
13606    }
13607}
13608impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13609    fn default() -> Self {
13610        Self::DEFAULT.clone()
13611    }
13612}
13613impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13614    type Message = MavMessage;
13615    const ID: u32 = 101u32;
13616    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
13617    const EXTRA_CRC: u8 = 102u8;
13618    const ENCODED_LEN: usize = 117usize;
13619    fn deser(
13620        _version: MavlinkVersion,
13621        __input: &[u8],
13622    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13623        let avail_len = __input.len();
13624        let mut payload_buf = [0; Self::ENCODED_LEN];
13625        let mut buf = if avail_len < Self::ENCODED_LEN {
13626            payload_buf[0..avail_len].copy_from_slice(__input);
13627            Bytes::new(&payload_buf)
13628        } else {
13629            Bytes::new(__input)
13630        };
13631        let mut __struct = Self::default();
13632        __struct.usec = buf.get_u64_le();
13633        __struct.x = buf.get_f32_le();
13634        __struct.y = buf.get_f32_le();
13635        __struct.z = buf.get_f32_le();
13636        __struct.roll = buf.get_f32_le();
13637        __struct.pitch = buf.get_f32_le();
13638        __struct.yaw = buf.get_f32_le();
13639        for v in &mut __struct.covariance {
13640            let val = buf.get_f32_le();
13641            *v = val;
13642        }
13643        __struct.reset_counter = buf.get_u8();
13644        Ok(__struct)
13645    }
13646    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13647        let mut __tmp = BytesMut::new(bytes);
13648        #[allow(clippy::absurd_extreme_comparisons)]
13649        #[allow(unused_comparisons)]
13650        if __tmp.remaining() < Self::ENCODED_LEN {
13651            panic!(
13652                "buffer is too small (need {} bytes, but got {})",
13653                Self::ENCODED_LEN,
13654                __tmp.remaining(),
13655            )
13656        }
13657        __tmp.put_u64_le(self.usec);
13658        __tmp.put_f32_le(self.x);
13659        __tmp.put_f32_le(self.y);
13660        __tmp.put_f32_le(self.z);
13661        __tmp.put_f32_le(self.roll);
13662        __tmp.put_f32_le(self.pitch);
13663        __tmp.put_f32_le(self.yaw);
13664        if matches!(version, MavlinkVersion::V2) {
13665            for val in &self.covariance {
13666                __tmp.put_f32_le(*val);
13667            }
13668            __tmp.put_u8(self.reset_counter);
13669            let len = __tmp.len();
13670            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13671        } else {
13672            __tmp.len()
13673        }
13674    }
13675}
13676#[doc = "Second GPS data."]
13677#[doc = ""]
13678#[doc = "ID: 124"]
13679#[derive(Debug, Clone, PartialEq)]
13680#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13681#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13682#[cfg_attr(feature = "ts", derive(TS))]
13683#[cfg_attr(feature = "ts", ts(export))]
13684pub struct GPS2_RAW_DATA {
13685    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13686    pub time_usec: u64,
13687    #[doc = "Latitude (WGS84)"]
13688    pub lat: i32,
13689    #[doc = "Longitude (WGS84)"]
13690    pub lon: i32,
13691    #[doc = "Altitude (MSL). Positive for up."]
13692    pub alt: i32,
13693    #[doc = "Age of DGPS info"]
13694    pub dgps_age: u32,
13695    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13696    pub eph: u16,
13697    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13698    pub epv: u16,
13699    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
13700    pub vel: u16,
13701    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13702    pub cog: u16,
13703    #[doc = "GPS fix type."]
13704    pub fix_type: GpsFixType,
13705    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
13706    pub satellites_visible: u8,
13707    #[doc = "Number of DGPS satellites"]
13708    pub dgps_numch: u8,
13709    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
13710    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13711    pub yaw: u16,
13712    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
13713    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13714    pub alt_ellipsoid: i32,
13715    #[doc = "Position uncertainty."]
13716    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13717    pub h_acc: u32,
13718    #[doc = "Altitude uncertainty."]
13719    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13720    pub v_acc: u32,
13721    #[doc = "Speed uncertainty."]
13722    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13723    pub vel_acc: u32,
13724    #[doc = "Heading / track uncertainty"]
13725    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13726    pub hdg_acc: u32,
13727}
13728impl GPS2_RAW_DATA {
13729    pub const ENCODED_LEN: usize = 57usize;
13730    pub const DEFAULT: Self = Self {
13731        time_usec: 0_u64,
13732        lat: 0_i32,
13733        lon: 0_i32,
13734        alt: 0_i32,
13735        dgps_age: 0_u32,
13736        eph: 0_u16,
13737        epv: 0_u16,
13738        vel: 0_u16,
13739        cog: 0_u16,
13740        fix_type: GpsFixType::DEFAULT,
13741        satellites_visible: 0_u8,
13742        dgps_numch: 0_u8,
13743        yaw: 0_u16,
13744        alt_ellipsoid: 0_i32,
13745        h_acc: 0_u32,
13746        v_acc: 0_u32,
13747        vel_acc: 0_u32,
13748        hdg_acc: 0_u32,
13749    };
13750    #[cfg(feature = "arbitrary")]
13751    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13752        use arbitrary::{Arbitrary, Unstructured};
13753        let mut buf = [0u8; 1024];
13754        rng.fill_bytes(&mut buf);
13755        let mut unstructured = Unstructured::new(&buf);
13756        Self::arbitrary(&mut unstructured).unwrap_or_default()
13757    }
13758}
13759impl Default for GPS2_RAW_DATA {
13760    fn default() -> Self {
13761        Self::DEFAULT.clone()
13762    }
13763}
13764impl MessageData for GPS2_RAW_DATA {
13765    type Message = MavMessage;
13766    const ID: u32 = 124u32;
13767    const NAME: &'static str = "GPS2_RAW";
13768    const EXTRA_CRC: u8 = 87u8;
13769    const ENCODED_LEN: usize = 57usize;
13770    fn deser(
13771        _version: MavlinkVersion,
13772        __input: &[u8],
13773    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13774        let avail_len = __input.len();
13775        let mut payload_buf = [0; Self::ENCODED_LEN];
13776        let mut buf = if avail_len < Self::ENCODED_LEN {
13777            payload_buf[0..avail_len].copy_from_slice(__input);
13778            Bytes::new(&payload_buf)
13779        } else {
13780            Bytes::new(__input)
13781        };
13782        let mut __struct = Self::default();
13783        __struct.time_usec = buf.get_u64_le();
13784        __struct.lat = buf.get_i32_le();
13785        __struct.lon = buf.get_i32_le();
13786        __struct.alt = buf.get_i32_le();
13787        __struct.dgps_age = buf.get_u32_le();
13788        __struct.eph = buf.get_u16_le();
13789        __struct.epv = buf.get_u16_le();
13790        __struct.vel = buf.get_u16_le();
13791        __struct.cog = buf.get_u16_le();
13792        let tmp = buf.get_u8();
13793        __struct.fix_type =
13794            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13795                enum_type: "GpsFixType",
13796                value: tmp as u32,
13797            })?;
13798        __struct.satellites_visible = buf.get_u8();
13799        __struct.dgps_numch = buf.get_u8();
13800        __struct.yaw = buf.get_u16_le();
13801        __struct.alt_ellipsoid = buf.get_i32_le();
13802        __struct.h_acc = buf.get_u32_le();
13803        __struct.v_acc = buf.get_u32_le();
13804        __struct.vel_acc = buf.get_u32_le();
13805        __struct.hdg_acc = buf.get_u32_le();
13806        Ok(__struct)
13807    }
13808    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13809        let mut __tmp = BytesMut::new(bytes);
13810        #[allow(clippy::absurd_extreme_comparisons)]
13811        #[allow(unused_comparisons)]
13812        if __tmp.remaining() < Self::ENCODED_LEN {
13813            panic!(
13814                "buffer is too small (need {} bytes, but got {})",
13815                Self::ENCODED_LEN,
13816                __tmp.remaining(),
13817            )
13818        }
13819        __tmp.put_u64_le(self.time_usec);
13820        __tmp.put_i32_le(self.lat);
13821        __tmp.put_i32_le(self.lon);
13822        __tmp.put_i32_le(self.alt);
13823        __tmp.put_u32_le(self.dgps_age);
13824        __tmp.put_u16_le(self.eph);
13825        __tmp.put_u16_le(self.epv);
13826        __tmp.put_u16_le(self.vel);
13827        __tmp.put_u16_le(self.cog);
13828        __tmp.put_u8(self.fix_type as u8);
13829        __tmp.put_u8(self.satellites_visible);
13830        __tmp.put_u8(self.dgps_numch);
13831        if matches!(version, MavlinkVersion::V2) {
13832            __tmp.put_u16_le(self.yaw);
13833            __tmp.put_i32_le(self.alt_ellipsoid);
13834            __tmp.put_u32_le(self.h_acc);
13835            __tmp.put_u32_le(self.v_acc);
13836            __tmp.put_u32_le(self.vel_acc);
13837            __tmp.put_u32_le(self.hdg_acc);
13838            let len = __tmp.len();
13839            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13840        } else {
13841            __tmp.len()
13842        }
13843    }
13844}
13845#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
13846#[doc = ""]
13847#[doc = "ID: 128"]
13848#[derive(Debug, Clone, PartialEq)]
13849#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13850#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13851#[cfg_attr(feature = "ts", derive(TS))]
13852#[cfg_attr(feature = "ts", ts(export))]
13853pub struct GPS2_RTK_DATA {
13854    #[doc = "Time since boot of last baseline message received."]
13855    pub time_last_baseline_ms: u32,
13856    #[doc = "GPS Time of Week of last baseline"]
13857    pub tow: u32,
13858    #[doc = "Current baseline in ECEF x or NED north component."]
13859    pub baseline_a_mm: i32,
13860    #[doc = "Current baseline in ECEF y or NED east component."]
13861    pub baseline_b_mm: i32,
13862    #[doc = "Current baseline in ECEF z or NED down component."]
13863    pub baseline_c_mm: i32,
13864    #[doc = "Current estimate of baseline accuracy."]
13865    pub accuracy: u32,
13866    #[doc = "Current number of integer ambiguity hypotheses."]
13867    pub iar_num_hypotheses: i32,
13868    #[doc = "GPS Week Number of last baseline"]
13869    pub wn: u16,
13870    #[doc = "Identification of connected RTK receiver."]
13871    pub rtk_receiver_id: u8,
13872    #[doc = "GPS-specific health report for RTK data."]
13873    pub rtk_health: u8,
13874    #[doc = "Rate of baseline messages being received by GPS"]
13875    pub rtk_rate: u8,
13876    #[doc = "Current number of sats used for RTK calculation."]
13877    pub nsats: u8,
13878    #[doc = "Coordinate system of baseline"]
13879    pub baseline_coords_type: RtkBaselineCoordinateSystem,
13880}
13881impl GPS2_RTK_DATA {
13882    pub const ENCODED_LEN: usize = 35usize;
13883    pub const DEFAULT: Self = Self {
13884        time_last_baseline_ms: 0_u32,
13885        tow: 0_u32,
13886        baseline_a_mm: 0_i32,
13887        baseline_b_mm: 0_i32,
13888        baseline_c_mm: 0_i32,
13889        accuracy: 0_u32,
13890        iar_num_hypotheses: 0_i32,
13891        wn: 0_u16,
13892        rtk_receiver_id: 0_u8,
13893        rtk_health: 0_u8,
13894        rtk_rate: 0_u8,
13895        nsats: 0_u8,
13896        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
13897    };
13898    #[cfg(feature = "arbitrary")]
13899    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13900        use arbitrary::{Arbitrary, Unstructured};
13901        let mut buf = [0u8; 1024];
13902        rng.fill_bytes(&mut buf);
13903        let mut unstructured = Unstructured::new(&buf);
13904        Self::arbitrary(&mut unstructured).unwrap_or_default()
13905    }
13906}
13907impl Default for GPS2_RTK_DATA {
13908    fn default() -> Self {
13909        Self::DEFAULT.clone()
13910    }
13911}
13912impl MessageData for GPS2_RTK_DATA {
13913    type Message = MavMessage;
13914    const ID: u32 = 128u32;
13915    const NAME: &'static str = "GPS2_RTK";
13916    const EXTRA_CRC: u8 = 226u8;
13917    const ENCODED_LEN: usize = 35usize;
13918    fn deser(
13919        _version: MavlinkVersion,
13920        __input: &[u8],
13921    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13922        let avail_len = __input.len();
13923        let mut payload_buf = [0; Self::ENCODED_LEN];
13924        let mut buf = if avail_len < Self::ENCODED_LEN {
13925            payload_buf[0..avail_len].copy_from_slice(__input);
13926            Bytes::new(&payload_buf)
13927        } else {
13928            Bytes::new(__input)
13929        };
13930        let mut __struct = Self::default();
13931        __struct.time_last_baseline_ms = buf.get_u32_le();
13932        __struct.tow = buf.get_u32_le();
13933        __struct.baseline_a_mm = buf.get_i32_le();
13934        __struct.baseline_b_mm = buf.get_i32_le();
13935        __struct.baseline_c_mm = buf.get_i32_le();
13936        __struct.accuracy = buf.get_u32_le();
13937        __struct.iar_num_hypotheses = buf.get_i32_le();
13938        __struct.wn = buf.get_u16_le();
13939        __struct.rtk_receiver_id = buf.get_u8();
13940        __struct.rtk_health = buf.get_u8();
13941        __struct.rtk_rate = buf.get_u8();
13942        __struct.nsats = buf.get_u8();
13943        let tmp = buf.get_u8();
13944        __struct.baseline_coords_type =
13945            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13946                enum_type: "RtkBaselineCoordinateSystem",
13947                value: tmp as u32,
13948            })?;
13949        Ok(__struct)
13950    }
13951    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13952        let mut __tmp = BytesMut::new(bytes);
13953        #[allow(clippy::absurd_extreme_comparisons)]
13954        #[allow(unused_comparisons)]
13955        if __tmp.remaining() < Self::ENCODED_LEN {
13956            panic!(
13957                "buffer is too small (need {} bytes, but got {})",
13958                Self::ENCODED_LEN,
13959                __tmp.remaining(),
13960            )
13961        }
13962        __tmp.put_u32_le(self.time_last_baseline_ms);
13963        __tmp.put_u32_le(self.tow);
13964        __tmp.put_i32_le(self.baseline_a_mm);
13965        __tmp.put_i32_le(self.baseline_b_mm);
13966        __tmp.put_i32_le(self.baseline_c_mm);
13967        __tmp.put_u32_le(self.accuracy);
13968        __tmp.put_i32_le(self.iar_num_hypotheses);
13969        __tmp.put_u16_le(self.wn);
13970        __tmp.put_u8(self.rtk_receiver_id);
13971        __tmp.put_u8(self.rtk_health);
13972        __tmp.put_u8(self.rtk_rate);
13973        __tmp.put_u8(self.nsats);
13974        __tmp.put_u8(self.baseline_coords_type as u8);
13975        if matches!(version, MavlinkVersion::V2) {
13976            let len = __tmp.len();
13977            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13978        } else {
13979            __tmp.len()
13980        }
13981    }
13982}
13983#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
13984#[doc = ""]
13985#[doc = "ID: 49"]
13986#[derive(Debug, Clone, PartialEq)]
13987#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13988#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13989#[cfg_attr(feature = "ts", derive(TS))]
13990#[cfg_attr(feature = "ts", ts(export))]
13991pub struct GPS_GLOBAL_ORIGIN_DATA {
13992    #[doc = "Latitude (WGS84)"]
13993    pub latitude: i32,
13994    #[doc = "Longitude (WGS84)"]
13995    pub longitude: i32,
13996    #[doc = "Altitude (MSL). Positive for up."]
13997    pub altitude: i32,
13998    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13999    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14000    pub time_usec: u64,
14001}
14002impl GPS_GLOBAL_ORIGIN_DATA {
14003    pub const ENCODED_LEN: usize = 20usize;
14004    pub const DEFAULT: Self = Self {
14005        latitude: 0_i32,
14006        longitude: 0_i32,
14007        altitude: 0_i32,
14008        time_usec: 0_u64,
14009    };
14010    #[cfg(feature = "arbitrary")]
14011    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14012        use arbitrary::{Arbitrary, Unstructured};
14013        let mut buf = [0u8; 1024];
14014        rng.fill_bytes(&mut buf);
14015        let mut unstructured = Unstructured::new(&buf);
14016        Self::arbitrary(&mut unstructured).unwrap_or_default()
14017    }
14018}
14019impl Default for GPS_GLOBAL_ORIGIN_DATA {
14020    fn default() -> Self {
14021        Self::DEFAULT.clone()
14022    }
14023}
14024impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
14025    type Message = MavMessage;
14026    const ID: u32 = 49u32;
14027    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
14028    const EXTRA_CRC: u8 = 39u8;
14029    const ENCODED_LEN: usize = 20usize;
14030    fn deser(
14031        _version: MavlinkVersion,
14032        __input: &[u8],
14033    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14034        let avail_len = __input.len();
14035        let mut payload_buf = [0; Self::ENCODED_LEN];
14036        let mut buf = if avail_len < Self::ENCODED_LEN {
14037            payload_buf[0..avail_len].copy_from_slice(__input);
14038            Bytes::new(&payload_buf)
14039        } else {
14040            Bytes::new(__input)
14041        };
14042        let mut __struct = Self::default();
14043        __struct.latitude = buf.get_i32_le();
14044        __struct.longitude = buf.get_i32_le();
14045        __struct.altitude = buf.get_i32_le();
14046        __struct.time_usec = buf.get_u64_le();
14047        Ok(__struct)
14048    }
14049    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14050        let mut __tmp = BytesMut::new(bytes);
14051        #[allow(clippy::absurd_extreme_comparisons)]
14052        #[allow(unused_comparisons)]
14053        if __tmp.remaining() < Self::ENCODED_LEN {
14054            panic!(
14055                "buffer is too small (need {} bytes, but got {})",
14056                Self::ENCODED_LEN,
14057                __tmp.remaining(),
14058            )
14059        }
14060        __tmp.put_i32_le(self.latitude);
14061        __tmp.put_i32_le(self.longitude);
14062        __tmp.put_i32_le(self.altitude);
14063        if matches!(version, MavlinkVersion::V2) {
14064            __tmp.put_u64_le(self.time_usec);
14065            let len = __tmp.len();
14066            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14067        } else {
14068            __tmp.len()
14069        }
14070    }
14071}
14072#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14073#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14074#[doc = ""]
14075#[doc = "ID: 123"]
14076#[derive(Debug, Clone, PartialEq)]
14077#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14078#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14079#[cfg_attr(feature = "ts", derive(TS))]
14080#[cfg_attr(feature = "ts", ts(export))]
14081pub struct GPS_INJECT_DATA_DATA {
14082    #[doc = "System ID"]
14083    pub target_system: u8,
14084    #[doc = "Component ID"]
14085    pub target_component: u8,
14086    #[doc = "Data length"]
14087    pub len: u8,
14088    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14089    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14090    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14091    pub data: [u8; 110],
14092}
14093impl GPS_INJECT_DATA_DATA {
14094    pub const ENCODED_LEN: usize = 113usize;
14095    pub const DEFAULT: Self = Self {
14096        target_system: 0_u8,
14097        target_component: 0_u8,
14098        len: 0_u8,
14099        data: [0_u8; 110usize],
14100    };
14101    #[cfg(feature = "arbitrary")]
14102    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14103        use arbitrary::{Arbitrary, Unstructured};
14104        let mut buf = [0u8; 1024];
14105        rng.fill_bytes(&mut buf);
14106        let mut unstructured = Unstructured::new(&buf);
14107        Self::arbitrary(&mut unstructured).unwrap_or_default()
14108    }
14109}
14110impl Default for GPS_INJECT_DATA_DATA {
14111    fn default() -> Self {
14112        Self::DEFAULT.clone()
14113    }
14114}
14115impl MessageData for GPS_INJECT_DATA_DATA {
14116    type Message = MavMessage;
14117    const ID: u32 = 123u32;
14118    const NAME: &'static str = "GPS_INJECT_DATA";
14119    const EXTRA_CRC: u8 = 250u8;
14120    const ENCODED_LEN: usize = 113usize;
14121    fn deser(
14122        _version: MavlinkVersion,
14123        __input: &[u8],
14124    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14125        let avail_len = __input.len();
14126        let mut payload_buf = [0; Self::ENCODED_LEN];
14127        let mut buf = if avail_len < Self::ENCODED_LEN {
14128            payload_buf[0..avail_len].copy_from_slice(__input);
14129            Bytes::new(&payload_buf)
14130        } else {
14131            Bytes::new(__input)
14132        };
14133        let mut __struct = Self::default();
14134        __struct.target_system = buf.get_u8();
14135        __struct.target_component = buf.get_u8();
14136        __struct.len = buf.get_u8();
14137        for v in &mut __struct.data {
14138            let val = buf.get_u8();
14139            *v = val;
14140        }
14141        Ok(__struct)
14142    }
14143    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14144        let mut __tmp = BytesMut::new(bytes);
14145        #[allow(clippy::absurd_extreme_comparisons)]
14146        #[allow(unused_comparisons)]
14147        if __tmp.remaining() < Self::ENCODED_LEN {
14148            panic!(
14149                "buffer is too small (need {} bytes, but got {})",
14150                Self::ENCODED_LEN,
14151                __tmp.remaining(),
14152            )
14153        }
14154        __tmp.put_u8(self.target_system);
14155        __tmp.put_u8(self.target_component);
14156        __tmp.put_u8(self.len);
14157        for val in &self.data {
14158            __tmp.put_u8(*val);
14159        }
14160        if matches!(version, MavlinkVersion::V2) {
14161            let len = __tmp.len();
14162            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14163        } else {
14164            __tmp.len()
14165        }
14166    }
14167}
14168#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
14169#[doc = ""]
14170#[doc = "ID: 232"]
14171#[derive(Debug, Clone, PartialEq)]
14172#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14173#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14174#[cfg_attr(feature = "ts", derive(TS))]
14175#[cfg_attr(feature = "ts", ts(export))]
14176pub struct GPS_INPUT_DATA {
14177    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14178    pub time_usec: u64,
14179    #[doc = "GPS time (from start of GPS week)"]
14180    pub time_week_ms: u32,
14181    #[doc = "Latitude (WGS84)"]
14182    pub lat: i32,
14183    #[doc = "Longitude (WGS84)"]
14184    pub lon: i32,
14185    #[doc = "Altitude (MSL). Positive for up."]
14186    pub alt: f32,
14187    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14188    pub hdop: f32,
14189    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14190    pub vdop: f32,
14191    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
14192    pub vn: f32,
14193    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
14194    pub ve: f32,
14195    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
14196    pub vd: f32,
14197    #[doc = "GPS speed accuracy"]
14198    pub speed_accuracy: f32,
14199    #[doc = "GPS horizontal accuracy"]
14200    pub horiz_accuracy: f32,
14201    #[doc = "GPS vertical accuracy"]
14202    pub vert_accuracy: f32,
14203    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
14204    pub ignore_flags: GpsInputIgnoreFlags,
14205    #[doc = "GPS week number"]
14206    pub time_week: u16,
14207    #[doc = "ID of the GPS for multiple GPS inputs"]
14208    pub gps_id: u8,
14209    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
14210    pub fix_type: u8,
14211    #[doc = "Number of satellites visible."]
14212    pub satellites_visible: u8,
14213    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
14214    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14215    pub yaw: u16,
14216}
14217impl GPS_INPUT_DATA {
14218    pub const ENCODED_LEN: usize = 65usize;
14219    pub const DEFAULT: Self = Self {
14220        time_usec: 0_u64,
14221        time_week_ms: 0_u32,
14222        lat: 0_i32,
14223        lon: 0_i32,
14224        alt: 0.0_f32,
14225        hdop: 0.0_f32,
14226        vdop: 0.0_f32,
14227        vn: 0.0_f32,
14228        ve: 0.0_f32,
14229        vd: 0.0_f32,
14230        speed_accuracy: 0.0_f32,
14231        horiz_accuracy: 0.0_f32,
14232        vert_accuracy: 0.0_f32,
14233        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
14234        time_week: 0_u16,
14235        gps_id: 0_u8,
14236        fix_type: 0_u8,
14237        satellites_visible: 0_u8,
14238        yaw: 0_u16,
14239    };
14240    #[cfg(feature = "arbitrary")]
14241    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14242        use arbitrary::{Arbitrary, Unstructured};
14243        let mut buf = [0u8; 1024];
14244        rng.fill_bytes(&mut buf);
14245        let mut unstructured = Unstructured::new(&buf);
14246        Self::arbitrary(&mut unstructured).unwrap_or_default()
14247    }
14248}
14249impl Default for GPS_INPUT_DATA {
14250    fn default() -> Self {
14251        Self::DEFAULT.clone()
14252    }
14253}
14254impl MessageData for GPS_INPUT_DATA {
14255    type Message = MavMessage;
14256    const ID: u32 = 232u32;
14257    const NAME: &'static str = "GPS_INPUT";
14258    const EXTRA_CRC: u8 = 151u8;
14259    const ENCODED_LEN: usize = 65usize;
14260    fn deser(
14261        _version: MavlinkVersion,
14262        __input: &[u8],
14263    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14264        let avail_len = __input.len();
14265        let mut payload_buf = [0; Self::ENCODED_LEN];
14266        let mut buf = if avail_len < Self::ENCODED_LEN {
14267            payload_buf[0..avail_len].copy_from_slice(__input);
14268            Bytes::new(&payload_buf)
14269        } else {
14270            Bytes::new(__input)
14271        };
14272        let mut __struct = Self::default();
14273        __struct.time_usec = buf.get_u64_le();
14274        __struct.time_week_ms = buf.get_u32_le();
14275        __struct.lat = buf.get_i32_le();
14276        __struct.lon = buf.get_i32_le();
14277        __struct.alt = buf.get_f32_le();
14278        __struct.hdop = buf.get_f32_le();
14279        __struct.vdop = buf.get_f32_le();
14280        __struct.vn = buf.get_f32_le();
14281        __struct.ve = buf.get_f32_le();
14282        __struct.vd = buf.get_f32_le();
14283        __struct.speed_accuracy = buf.get_f32_le();
14284        __struct.horiz_accuracy = buf.get_f32_le();
14285        __struct.vert_accuracy = buf.get_f32_le();
14286        let tmp = buf.get_u16_le();
14287        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
14288            tmp & GpsInputIgnoreFlags::all().bits(),
14289        )
14290        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14291            flag_type: "GpsInputIgnoreFlags",
14292            value: tmp as u32,
14293        })?;
14294        __struct.time_week = buf.get_u16_le();
14295        __struct.gps_id = buf.get_u8();
14296        __struct.fix_type = buf.get_u8();
14297        __struct.satellites_visible = buf.get_u8();
14298        __struct.yaw = buf.get_u16_le();
14299        Ok(__struct)
14300    }
14301    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14302        let mut __tmp = BytesMut::new(bytes);
14303        #[allow(clippy::absurd_extreme_comparisons)]
14304        #[allow(unused_comparisons)]
14305        if __tmp.remaining() < Self::ENCODED_LEN {
14306            panic!(
14307                "buffer is too small (need {} bytes, but got {})",
14308                Self::ENCODED_LEN,
14309                __tmp.remaining(),
14310            )
14311        }
14312        __tmp.put_u64_le(self.time_usec);
14313        __tmp.put_u32_le(self.time_week_ms);
14314        __tmp.put_i32_le(self.lat);
14315        __tmp.put_i32_le(self.lon);
14316        __tmp.put_f32_le(self.alt);
14317        __tmp.put_f32_le(self.hdop);
14318        __tmp.put_f32_le(self.vdop);
14319        __tmp.put_f32_le(self.vn);
14320        __tmp.put_f32_le(self.ve);
14321        __tmp.put_f32_le(self.vd);
14322        __tmp.put_f32_le(self.speed_accuracy);
14323        __tmp.put_f32_le(self.horiz_accuracy);
14324        __tmp.put_f32_le(self.vert_accuracy);
14325        __tmp.put_u16_le(self.ignore_flags.bits());
14326        __tmp.put_u16_le(self.time_week);
14327        __tmp.put_u8(self.gps_id);
14328        __tmp.put_u8(self.fix_type);
14329        __tmp.put_u8(self.satellites_visible);
14330        if matches!(version, MavlinkVersion::V2) {
14331            __tmp.put_u16_le(self.yaw);
14332            let len = __tmp.len();
14333            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14334        } else {
14335            __tmp.len()
14336        }
14337    }
14338}
14339#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
14340#[doc = ""]
14341#[doc = "ID: 24"]
14342#[derive(Debug, Clone, PartialEq)]
14343#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14344#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14345#[cfg_attr(feature = "ts", derive(TS))]
14346#[cfg_attr(feature = "ts", ts(export))]
14347pub struct GPS_RAW_INT_DATA {
14348    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14349    pub time_usec: u64,
14350    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
14351    pub lat: i32,
14352    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
14353    pub lon: i32,
14354    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
14355    pub alt: i32,
14356    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14357    pub eph: u16,
14358    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14359    pub epv: u16,
14360    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14361    pub vel: u16,
14362    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14363    pub cog: u16,
14364    #[doc = "GPS fix type."]
14365    pub fix_type: GpsFixType,
14366    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14367    pub satellites_visible: u8,
14368    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14369    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14370    pub alt_ellipsoid: i32,
14371    #[doc = "Position uncertainty."]
14372    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14373    pub h_acc: u32,
14374    #[doc = "Altitude uncertainty."]
14375    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14376    pub v_acc: u32,
14377    #[doc = "Speed uncertainty."]
14378    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14379    pub vel_acc: u32,
14380    #[doc = "Heading / track uncertainty"]
14381    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14382    pub hdg_acc: u32,
14383    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14384    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14385    pub yaw: u16,
14386}
14387impl GPS_RAW_INT_DATA {
14388    pub const ENCODED_LEN: usize = 52usize;
14389    pub const DEFAULT: Self = Self {
14390        time_usec: 0_u64,
14391        lat: 0_i32,
14392        lon: 0_i32,
14393        alt: 0_i32,
14394        eph: 0_u16,
14395        epv: 0_u16,
14396        vel: 0_u16,
14397        cog: 0_u16,
14398        fix_type: GpsFixType::DEFAULT,
14399        satellites_visible: 0_u8,
14400        alt_ellipsoid: 0_i32,
14401        h_acc: 0_u32,
14402        v_acc: 0_u32,
14403        vel_acc: 0_u32,
14404        hdg_acc: 0_u32,
14405        yaw: 0_u16,
14406    };
14407    #[cfg(feature = "arbitrary")]
14408    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14409        use arbitrary::{Arbitrary, Unstructured};
14410        let mut buf = [0u8; 1024];
14411        rng.fill_bytes(&mut buf);
14412        let mut unstructured = Unstructured::new(&buf);
14413        Self::arbitrary(&mut unstructured).unwrap_or_default()
14414    }
14415}
14416impl Default for GPS_RAW_INT_DATA {
14417    fn default() -> Self {
14418        Self::DEFAULT.clone()
14419    }
14420}
14421impl MessageData for GPS_RAW_INT_DATA {
14422    type Message = MavMessage;
14423    const ID: u32 = 24u32;
14424    const NAME: &'static str = "GPS_RAW_INT";
14425    const EXTRA_CRC: u8 = 24u8;
14426    const ENCODED_LEN: usize = 52usize;
14427    fn deser(
14428        _version: MavlinkVersion,
14429        __input: &[u8],
14430    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14431        let avail_len = __input.len();
14432        let mut payload_buf = [0; Self::ENCODED_LEN];
14433        let mut buf = if avail_len < Self::ENCODED_LEN {
14434            payload_buf[0..avail_len].copy_from_slice(__input);
14435            Bytes::new(&payload_buf)
14436        } else {
14437            Bytes::new(__input)
14438        };
14439        let mut __struct = Self::default();
14440        __struct.time_usec = buf.get_u64_le();
14441        __struct.lat = buf.get_i32_le();
14442        __struct.lon = buf.get_i32_le();
14443        __struct.alt = buf.get_i32_le();
14444        __struct.eph = buf.get_u16_le();
14445        __struct.epv = buf.get_u16_le();
14446        __struct.vel = buf.get_u16_le();
14447        __struct.cog = buf.get_u16_le();
14448        let tmp = buf.get_u8();
14449        __struct.fix_type =
14450            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14451                enum_type: "GpsFixType",
14452                value: tmp as u32,
14453            })?;
14454        __struct.satellites_visible = buf.get_u8();
14455        __struct.alt_ellipsoid = buf.get_i32_le();
14456        __struct.h_acc = buf.get_u32_le();
14457        __struct.v_acc = buf.get_u32_le();
14458        __struct.vel_acc = buf.get_u32_le();
14459        __struct.hdg_acc = buf.get_u32_le();
14460        __struct.yaw = buf.get_u16_le();
14461        Ok(__struct)
14462    }
14463    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14464        let mut __tmp = BytesMut::new(bytes);
14465        #[allow(clippy::absurd_extreme_comparisons)]
14466        #[allow(unused_comparisons)]
14467        if __tmp.remaining() < Self::ENCODED_LEN {
14468            panic!(
14469                "buffer is too small (need {} bytes, but got {})",
14470                Self::ENCODED_LEN,
14471                __tmp.remaining(),
14472            )
14473        }
14474        __tmp.put_u64_le(self.time_usec);
14475        __tmp.put_i32_le(self.lat);
14476        __tmp.put_i32_le(self.lon);
14477        __tmp.put_i32_le(self.alt);
14478        __tmp.put_u16_le(self.eph);
14479        __tmp.put_u16_le(self.epv);
14480        __tmp.put_u16_le(self.vel);
14481        __tmp.put_u16_le(self.cog);
14482        __tmp.put_u8(self.fix_type as u8);
14483        __tmp.put_u8(self.satellites_visible);
14484        if matches!(version, MavlinkVersion::V2) {
14485            __tmp.put_i32_le(self.alt_ellipsoid);
14486            __tmp.put_u32_le(self.h_acc);
14487            __tmp.put_u32_le(self.v_acc);
14488            __tmp.put_u32_le(self.vel_acc);
14489            __tmp.put_u32_le(self.hdg_acc);
14490            __tmp.put_u16_le(self.yaw);
14491            let len = __tmp.len();
14492            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14493        } else {
14494            __tmp.len()
14495        }
14496    }
14497}
14498#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
14499#[doc = ""]
14500#[doc = "ID: 233"]
14501#[derive(Debug, Clone, PartialEq)]
14502#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14503#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14504#[cfg_attr(feature = "ts", derive(TS))]
14505#[cfg_attr(feature = "ts", ts(export))]
14506pub struct GPS_RTCM_DATA_DATA {
14507    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
14508    pub flags: u8,
14509    #[doc = "data length"]
14510    pub len: u8,
14511    #[doc = "RTCM message (may be fragmented)"]
14512    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14513    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14514    pub data: [u8; 180],
14515}
14516impl GPS_RTCM_DATA_DATA {
14517    pub const ENCODED_LEN: usize = 182usize;
14518    pub const DEFAULT: Self = Self {
14519        flags: 0_u8,
14520        len: 0_u8,
14521        data: [0_u8; 180usize],
14522    };
14523    #[cfg(feature = "arbitrary")]
14524    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14525        use arbitrary::{Arbitrary, Unstructured};
14526        let mut buf = [0u8; 1024];
14527        rng.fill_bytes(&mut buf);
14528        let mut unstructured = Unstructured::new(&buf);
14529        Self::arbitrary(&mut unstructured).unwrap_or_default()
14530    }
14531}
14532impl Default for GPS_RTCM_DATA_DATA {
14533    fn default() -> Self {
14534        Self::DEFAULT.clone()
14535    }
14536}
14537impl MessageData for GPS_RTCM_DATA_DATA {
14538    type Message = MavMessage;
14539    const ID: u32 = 233u32;
14540    const NAME: &'static str = "GPS_RTCM_DATA";
14541    const EXTRA_CRC: u8 = 35u8;
14542    const ENCODED_LEN: usize = 182usize;
14543    fn deser(
14544        _version: MavlinkVersion,
14545        __input: &[u8],
14546    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14547        let avail_len = __input.len();
14548        let mut payload_buf = [0; Self::ENCODED_LEN];
14549        let mut buf = if avail_len < Self::ENCODED_LEN {
14550            payload_buf[0..avail_len].copy_from_slice(__input);
14551            Bytes::new(&payload_buf)
14552        } else {
14553            Bytes::new(__input)
14554        };
14555        let mut __struct = Self::default();
14556        __struct.flags = buf.get_u8();
14557        __struct.len = buf.get_u8();
14558        for v in &mut __struct.data {
14559            let val = buf.get_u8();
14560            *v = val;
14561        }
14562        Ok(__struct)
14563    }
14564    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14565        let mut __tmp = BytesMut::new(bytes);
14566        #[allow(clippy::absurd_extreme_comparisons)]
14567        #[allow(unused_comparisons)]
14568        if __tmp.remaining() < Self::ENCODED_LEN {
14569            panic!(
14570                "buffer is too small (need {} bytes, but got {})",
14571                Self::ENCODED_LEN,
14572                __tmp.remaining(),
14573            )
14574        }
14575        __tmp.put_u8(self.flags);
14576        __tmp.put_u8(self.len);
14577        for val in &self.data {
14578            __tmp.put_u8(*val);
14579        }
14580        if matches!(version, MavlinkVersion::V2) {
14581            let len = __tmp.len();
14582            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14583        } else {
14584            __tmp.len()
14585        }
14586    }
14587}
14588#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14589#[doc = ""]
14590#[doc = "ID: 127"]
14591#[derive(Debug, Clone, PartialEq)]
14592#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14593#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14594#[cfg_attr(feature = "ts", derive(TS))]
14595#[cfg_attr(feature = "ts", ts(export))]
14596pub struct GPS_RTK_DATA {
14597    #[doc = "Time since boot of last baseline message received."]
14598    pub time_last_baseline_ms: u32,
14599    #[doc = "GPS Time of Week of last baseline"]
14600    pub tow: u32,
14601    #[doc = "Current baseline in ECEF x or NED north component."]
14602    pub baseline_a_mm: i32,
14603    #[doc = "Current baseline in ECEF y or NED east component."]
14604    pub baseline_b_mm: i32,
14605    #[doc = "Current baseline in ECEF z or NED down component."]
14606    pub baseline_c_mm: i32,
14607    #[doc = "Current estimate of baseline accuracy."]
14608    pub accuracy: u32,
14609    #[doc = "Current number of integer ambiguity hypotheses."]
14610    pub iar_num_hypotheses: i32,
14611    #[doc = "GPS Week Number of last baseline"]
14612    pub wn: u16,
14613    #[doc = "Identification of connected RTK receiver."]
14614    pub rtk_receiver_id: u8,
14615    #[doc = "GPS-specific health report for RTK data."]
14616    pub rtk_health: u8,
14617    #[doc = "Rate of baseline messages being received by GPS"]
14618    pub rtk_rate: u8,
14619    #[doc = "Current number of sats used for RTK calculation."]
14620    pub nsats: u8,
14621    #[doc = "Coordinate system of baseline"]
14622    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14623}
14624impl GPS_RTK_DATA {
14625    pub const ENCODED_LEN: usize = 35usize;
14626    pub const DEFAULT: Self = Self {
14627        time_last_baseline_ms: 0_u32,
14628        tow: 0_u32,
14629        baseline_a_mm: 0_i32,
14630        baseline_b_mm: 0_i32,
14631        baseline_c_mm: 0_i32,
14632        accuracy: 0_u32,
14633        iar_num_hypotheses: 0_i32,
14634        wn: 0_u16,
14635        rtk_receiver_id: 0_u8,
14636        rtk_health: 0_u8,
14637        rtk_rate: 0_u8,
14638        nsats: 0_u8,
14639        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14640    };
14641    #[cfg(feature = "arbitrary")]
14642    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14643        use arbitrary::{Arbitrary, Unstructured};
14644        let mut buf = [0u8; 1024];
14645        rng.fill_bytes(&mut buf);
14646        let mut unstructured = Unstructured::new(&buf);
14647        Self::arbitrary(&mut unstructured).unwrap_or_default()
14648    }
14649}
14650impl Default for GPS_RTK_DATA {
14651    fn default() -> Self {
14652        Self::DEFAULT.clone()
14653    }
14654}
14655impl MessageData for GPS_RTK_DATA {
14656    type Message = MavMessage;
14657    const ID: u32 = 127u32;
14658    const NAME: &'static str = "GPS_RTK";
14659    const EXTRA_CRC: u8 = 25u8;
14660    const ENCODED_LEN: usize = 35usize;
14661    fn deser(
14662        _version: MavlinkVersion,
14663        __input: &[u8],
14664    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14665        let avail_len = __input.len();
14666        let mut payload_buf = [0; Self::ENCODED_LEN];
14667        let mut buf = if avail_len < Self::ENCODED_LEN {
14668            payload_buf[0..avail_len].copy_from_slice(__input);
14669            Bytes::new(&payload_buf)
14670        } else {
14671            Bytes::new(__input)
14672        };
14673        let mut __struct = Self::default();
14674        __struct.time_last_baseline_ms = buf.get_u32_le();
14675        __struct.tow = buf.get_u32_le();
14676        __struct.baseline_a_mm = buf.get_i32_le();
14677        __struct.baseline_b_mm = buf.get_i32_le();
14678        __struct.baseline_c_mm = buf.get_i32_le();
14679        __struct.accuracy = buf.get_u32_le();
14680        __struct.iar_num_hypotheses = buf.get_i32_le();
14681        __struct.wn = buf.get_u16_le();
14682        __struct.rtk_receiver_id = buf.get_u8();
14683        __struct.rtk_health = buf.get_u8();
14684        __struct.rtk_rate = buf.get_u8();
14685        __struct.nsats = buf.get_u8();
14686        let tmp = buf.get_u8();
14687        __struct.baseline_coords_type =
14688            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14689                enum_type: "RtkBaselineCoordinateSystem",
14690                value: tmp as u32,
14691            })?;
14692        Ok(__struct)
14693    }
14694    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14695        let mut __tmp = BytesMut::new(bytes);
14696        #[allow(clippy::absurd_extreme_comparisons)]
14697        #[allow(unused_comparisons)]
14698        if __tmp.remaining() < Self::ENCODED_LEN {
14699            panic!(
14700                "buffer is too small (need {} bytes, but got {})",
14701                Self::ENCODED_LEN,
14702                __tmp.remaining(),
14703            )
14704        }
14705        __tmp.put_u32_le(self.time_last_baseline_ms);
14706        __tmp.put_u32_le(self.tow);
14707        __tmp.put_i32_le(self.baseline_a_mm);
14708        __tmp.put_i32_le(self.baseline_b_mm);
14709        __tmp.put_i32_le(self.baseline_c_mm);
14710        __tmp.put_u32_le(self.accuracy);
14711        __tmp.put_i32_le(self.iar_num_hypotheses);
14712        __tmp.put_u16_le(self.wn);
14713        __tmp.put_u8(self.rtk_receiver_id);
14714        __tmp.put_u8(self.rtk_health);
14715        __tmp.put_u8(self.rtk_rate);
14716        __tmp.put_u8(self.nsats);
14717        __tmp.put_u8(self.baseline_coords_type as u8);
14718        if matches!(version, MavlinkVersion::V2) {
14719            let len = __tmp.len();
14720            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14721        } else {
14722            __tmp.len()
14723        }
14724    }
14725}
14726#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
14727#[doc = ""]
14728#[doc = "ID: 25"]
14729#[derive(Debug, Clone, PartialEq)]
14730#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14731#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14732#[cfg_attr(feature = "ts", derive(TS))]
14733#[cfg_attr(feature = "ts", ts(export))]
14734pub struct GPS_STATUS_DATA {
14735    #[doc = "Number of satellites visible"]
14736    pub satellites_visible: u8,
14737    #[doc = "Global satellite ID"]
14738    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14739    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14740    pub satellite_prn: [u8; 20],
14741    #[doc = "0: Satellite not used, 1: used for localization"]
14742    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14743    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14744    pub satellite_used: [u8; 20],
14745    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
14746    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14747    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14748    pub satellite_elevation: [u8; 20],
14749    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
14750    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14751    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14752    pub satellite_azimuth: [u8; 20],
14753    #[doc = "Signal to noise ratio of satellite"]
14754    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14755    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14756    pub satellite_snr: [u8; 20],
14757}
14758impl GPS_STATUS_DATA {
14759    pub const ENCODED_LEN: usize = 101usize;
14760    pub const DEFAULT: Self = Self {
14761        satellites_visible: 0_u8,
14762        satellite_prn: [0_u8; 20usize],
14763        satellite_used: [0_u8; 20usize],
14764        satellite_elevation: [0_u8; 20usize],
14765        satellite_azimuth: [0_u8; 20usize],
14766        satellite_snr: [0_u8; 20usize],
14767    };
14768    #[cfg(feature = "arbitrary")]
14769    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14770        use arbitrary::{Arbitrary, Unstructured};
14771        let mut buf = [0u8; 1024];
14772        rng.fill_bytes(&mut buf);
14773        let mut unstructured = Unstructured::new(&buf);
14774        Self::arbitrary(&mut unstructured).unwrap_or_default()
14775    }
14776}
14777impl Default for GPS_STATUS_DATA {
14778    fn default() -> Self {
14779        Self::DEFAULT.clone()
14780    }
14781}
14782impl MessageData for GPS_STATUS_DATA {
14783    type Message = MavMessage;
14784    const ID: u32 = 25u32;
14785    const NAME: &'static str = "GPS_STATUS";
14786    const EXTRA_CRC: u8 = 23u8;
14787    const ENCODED_LEN: usize = 101usize;
14788    fn deser(
14789        _version: MavlinkVersion,
14790        __input: &[u8],
14791    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14792        let avail_len = __input.len();
14793        let mut payload_buf = [0; Self::ENCODED_LEN];
14794        let mut buf = if avail_len < Self::ENCODED_LEN {
14795            payload_buf[0..avail_len].copy_from_slice(__input);
14796            Bytes::new(&payload_buf)
14797        } else {
14798            Bytes::new(__input)
14799        };
14800        let mut __struct = Self::default();
14801        __struct.satellites_visible = buf.get_u8();
14802        for v in &mut __struct.satellite_prn {
14803            let val = buf.get_u8();
14804            *v = val;
14805        }
14806        for v in &mut __struct.satellite_used {
14807            let val = buf.get_u8();
14808            *v = val;
14809        }
14810        for v in &mut __struct.satellite_elevation {
14811            let val = buf.get_u8();
14812            *v = val;
14813        }
14814        for v in &mut __struct.satellite_azimuth {
14815            let val = buf.get_u8();
14816            *v = val;
14817        }
14818        for v in &mut __struct.satellite_snr {
14819            let val = buf.get_u8();
14820            *v = val;
14821        }
14822        Ok(__struct)
14823    }
14824    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14825        let mut __tmp = BytesMut::new(bytes);
14826        #[allow(clippy::absurd_extreme_comparisons)]
14827        #[allow(unused_comparisons)]
14828        if __tmp.remaining() < Self::ENCODED_LEN {
14829            panic!(
14830                "buffer is too small (need {} bytes, but got {})",
14831                Self::ENCODED_LEN,
14832                __tmp.remaining(),
14833            )
14834        }
14835        __tmp.put_u8(self.satellites_visible);
14836        for val in &self.satellite_prn {
14837            __tmp.put_u8(*val);
14838        }
14839        for val in &self.satellite_used {
14840            __tmp.put_u8(*val);
14841        }
14842        for val in &self.satellite_elevation {
14843            __tmp.put_u8(*val);
14844        }
14845        for val in &self.satellite_azimuth {
14846            __tmp.put_u8(*val);
14847        }
14848        for val in &self.satellite_snr {
14849            __tmp.put_u8(*val);
14850        }
14851        if matches!(version, MavlinkVersion::V2) {
14852            let len = __tmp.len();
14853            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14854        } else {
14855            __tmp.len()
14856        }
14857    }
14858}
14859#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
14860#[doc = ""]
14861#[doc = "ID: 0"]
14862#[derive(Debug, Clone, PartialEq)]
14863#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14864#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14865#[cfg_attr(feature = "ts", derive(TS))]
14866#[cfg_attr(feature = "ts", ts(export))]
14867pub struct HEARTBEAT_DATA {
14868    #[doc = "A bitfield for use for autopilot-specific flags"]
14869    pub custom_mode: u32,
14870    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
14871    pub mavtype: MavType,
14872    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
14873    pub autopilot: MavAutopilot,
14874    #[doc = "System mode bitmap."]
14875    pub base_mode: MavModeFlag,
14876    #[doc = "System status flag."]
14877    pub system_status: MavState,
14878    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
14879    pub mavlink_version: u8,
14880}
14881impl HEARTBEAT_DATA {
14882    pub const ENCODED_LEN: usize = 9usize;
14883    pub const DEFAULT: Self = Self {
14884        custom_mode: 0_u32,
14885        mavtype: MavType::DEFAULT,
14886        autopilot: MavAutopilot::DEFAULT,
14887        base_mode: MavModeFlag::DEFAULT,
14888        system_status: MavState::DEFAULT,
14889        mavlink_version: MINOR_MAVLINK_VERSION,
14890    };
14891    #[cfg(feature = "arbitrary")]
14892    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14893        use arbitrary::{Arbitrary, Unstructured};
14894        let mut buf = [0u8; 1024];
14895        rng.fill_bytes(&mut buf);
14896        let mut unstructured = Unstructured::new(&buf);
14897        Self::arbitrary(&mut unstructured).unwrap_or_default()
14898    }
14899}
14900impl Default for HEARTBEAT_DATA {
14901    fn default() -> Self {
14902        Self::DEFAULT.clone()
14903    }
14904}
14905impl MessageData for HEARTBEAT_DATA {
14906    type Message = MavMessage;
14907    const ID: u32 = 0u32;
14908    const NAME: &'static str = "HEARTBEAT";
14909    const EXTRA_CRC: u8 = 50u8;
14910    const ENCODED_LEN: usize = 9usize;
14911    fn deser(
14912        _version: MavlinkVersion,
14913        __input: &[u8],
14914    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14915        let avail_len = __input.len();
14916        let mut payload_buf = [0; Self::ENCODED_LEN];
14917        let mut buf = if avail_len < Self::ENCODED_LEN {
14918            payload_buf[0..avail_len].copy_from_slice(__input);
14919            Bytes::new(&payload_buf)
14920        } else {
14921            Bytes::new(__input)
14922        };
14923        let mut __struct = Self::default();
14924        __struct.custom_mode = buf.get_u32_le();
14925        let tmp = buf.get_u8();
14926        __struct.mavtype =
14927            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14928                enum_type: "MavType",
14929                value: tmp as u32,
14930            })?;
14931        let tmp = buf.get_u8();
14932        __struct.autopilot =
14933            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14934                enum_type: "MavAutopilot",
14935                value: tmp as u32,
14936            })?;
14937        let tmp = buf.get_u8();
14938        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
14939            ::mavlink_core::error::ParserError::InvalidFlag {
14940                flag_type: "MavModeFlag",
14941                value: tmp as u32,
14942            },
14943        )?;
14944        let tmp = buf.get_u8();
14945        __struct.system_status =
14946            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14947                enum_type: "MavState",
14948                value: tmp as u32,
14949            })?;
14950        __struct.mavlink_version = buf.get_u8();
14951        Ok(__struct)
14952    }
14953    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14954        let mut __tmp = BytesMut::new(bytes);
14955        #[allow(clippy::absurd_extreme_comparisons)]
14956        #[allow(unused_comparisons)]
14957        if __tmp.remaining() < Self::ENCODED_LEN {
14958            panic!(
14959                "buffer is too small (need {} bytes, but got {})",
14960                Self::ENCODED_LEN,
14961                __tmp.remaining(),
14962            )
14963        }
14964        __tmp.put_u32_le(self.custom_mode);
14965        __tmp.put_u8(self.mavtype as u8);
14966        __tmp.put_u8(self.autopilot as u8);
14967        __tmp.put_u8(self.base_mode.bits());
14968        __tmp.put_u8(self.system_status as u8);
14969        __tmp.put_u8(self.mavlink_version);
14970        if matches!(version, MavlinkVersion::V2) {
14971            let len = __tmp.len();
14972            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14973        } else {
14974            __tmp.len()
14975        }
14976    }
14977}
14978#[doc = "The IMU readings in SI units in NED body frame."]
14979#[doc = ""]
14980#[doc = "ID: 105"]
14981#[derive(Debug, Clone, PartialEq)]
14982#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14983#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14984#[cfg_attr(feature = "ts", derive(TS))]
14985#[cfg_attr(feature = "ts", ts(export))]
14986pub struct HIGHRES_IMU_DATA {
14987    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14988    pub time_usec: u64,
14989    #[doc = "X acceleration"]
14990    pub xacc: f32,
14991    #[doc = "Y acceleration"]
14992    pub yacc: f32,
14993    #[doc = "Z acceleration"]
14994    pub zacc: f32,
14995    #[doc = "Angular speed around X axis"]
14996    pub xgyro: f32,
14997    #[doc = "Angular speed around Y axis"]
14998    pub ygyro: f32,
14999    #[doc = "Angular speed around Z axis"]
15000    pub zgyro: f32,
15001    #[doc = "X Magnetic field"]
15002    pub xmag: f32,
15003    #[doc = "Y Magnetic field"]
15004    pub ymag: f32,
15005    #[doc = "Z Magnetic field"]
15006    pub zmag: f32,
15007    #[doc = "Absolute pressure"]
15008    pub abs_pressure: f32,
15009    #[doc = "Differential pressure"]
15010    pub diff_pressure: f32,
15011    #[doc = "Altitude calculated from pressure"]
15012    pub pressure_alt: f32,
15013    #[doc = "Temperature"]
15014    pub temperature: f32,
15015    #[doc = "Bitmap for fields that have updated since last message"]
15016    pub fields_updated: HighresImuUpdatedFlags,
15017    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
15018    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15019    pub id: u8,
15020}
15021impl HIGHRES_IMU_DATA {
15022    pub const ENCODED_LEN: usize = 63usize;
15023    pub const DEFAULT: Self = Self {
15024        time_usec: 0_u64,
15025        xacc: 0.0_f32,
15026        yacc: 0.0_f32,
15027        zacc: 0.0_f32,
15028        xgyro: 0.0_f32,
15029        ygyro: 0.0_f32,
15030        zgyro: 0.0_f32,
15031        xmag: 0.0_f32,
15032        ymag: 0.0_f32,
15033        zmag: 0.0_f32,
15034        abs_pressure: 0.0_f32,
15035        diff_pressure: 0.0_f32,
15036        pressure_alt: 0.0_f32,
15037        temperature: 0.0_f32,
15038        fields_updated: HighresImuUpdatedFlags::DEFAULT,
15039        id: 0_u8,
15040    };
15041    #[cfg(feature = "arbitrary")]
15042    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15043        use arbitrary::{Arbitrary, Unstructured};
15044        let mut buf = [0u8; 1024];
15045        rng.fill_bytes(&mut buf);
15046        let mut unstructured = Unstructured::new(&buf);
15047        Self::arbitrary(&mut unstructured).unwrap_or_default()
15048    }
15049}
15050impl Default for HIGHRES_IMU_DATA {
15051    fn default() -> Self {
15052        Self::DEFAULT.clone()
15053    }
15054}
15055impl MessageData for HIGHRES_IMU_DATA {
15056    type Message = MavMessage;
15057    const ID: u32 = 105u32;
15058    const NAME: &'static str = "HIGHRES_IMU";
15059    const EXTRA_CRC: u8 = 93u8;
15060    const ENCODED_LEN: usize = 63usize;
15061    fn deser(
15062        _version: MavlinkVersion,
15063        __input: &[u8],
15064    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15065        let avail_len = __input.len();
15066        let mut payload_buf = [0; Self::ENCODED_LEN];
15067        let mut buf = if avail_len < Self::ENCODED_LEN {
15068            payload_buf[0..avail_len].copy_from_slice(__input);
15069            Bytes::new(&payload_buf)
15070        } else {
15071            Bytes::new(__input)
15072        };
15073        let mut __struct = Self::default();
15074        __struct.time_usec = buf.get_u64_le();
15075        __struct.xacc = buf.get_f32_le();
15076        __struct.yacc = buf.get_f32_le();
15077        __struct.zacc = buf.get_f32_le();
15078        __struct.xgyro = buf.get_f32_le();
15079        __struct.ygyro = buf.get_f32_le();
15080        __struct.zgyro = buf.get_f32_le();
15081        __struct.xmag = buf.get_f32_le();
15082        __struct.ymag = buf.get_f32_le();
15083        __struct.zmag = buf.get_f32_le();
15084        __struct.abs_pressure = buf.get_f32_le();
15085        __struct.diff_pressure = buf.get_f32_le();
15086        __struct.pressure_alt = buf.get_f32_le();
15087        __struct.temperature = buf.get_f32_le();
15088        let tmp = buf.get_u16_le();
15089        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(
15090            tmp & HighresImuUpdatedFlags::all().bits(),
15091        )
15092        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15093            flag_type: "HighresImuUpdatedFlags",
15094            value: tmp as u32,
15095        })?;
15096        __struct.id = buf.get_u8();
15097        Ok(__struct)
15098    }
15099    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15100        let mut __tmp = BytesMut::new(bytes);
15101        #[allow(clippy::absurd_extreme_comparisons)]
15102        #[allow(unused_comparisons)]
15103        if __tmp.remaining() < Self::ENCODED_LEN {
15104            panic!(
15105                "buffer is too small (need {} bytes, but got {})",
15106                Self::ENCODED_LEN,
15107                __tmp.remaining(),
15108            )
15109        }
15110        __tmp.put_u64_le(self.time_usec);
15111        __tmp.put_f32_le(self.xacc);
15112        __tmp.put_f32_le(self.yacc);
15113        __tmp.put_f32_le(self.zacc);
15114        __tmp.put_f32_le(self.xgyro);
15115        __tmp.put_f32_le(self.ygyro);
15116        __tmp.put_f32_le(self.zgyro);
15117        __tmp.put_f32_le(self.xmag);
15118        __tmp.put_f32_le(self.ymag);
15119        __tmp.put_f32_le(self.zmag);
15120        __tmp.put_f32_le(self.abs_pressure);
15121        __tmp.put_f32_le(self.diff_pressure);
15122        __tmp.put_f32_le(self.pressure_alt);
15123        __tmp.put_f32_le(self.temperature);
15124        __tmp.put_u16_le(self.fields_updated.bits());
15125        if matches!(version, MavlinkVersion::V2) {
15126            __tmp.put_u8(self.id);
15127            let len = __tmp.len();
15128            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15129        } else {
15130            __tmp.len()
15131        }
15132    }
15133}
15134#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
15135#[doc = "Message appropriate for high latency connections like Iridium."]
15136#[doc = ""]
15137#[doc = "ID: 234"]
15138#[derive(Debug, Clone, PartialEq)]
15139#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15140#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15141#[cfg_attr(feature = "ts", derive(TS))]
15142#[cfg_attr(feature = "ts", ts(export))]
15143pub struct HIGH_LATENCY_DATA {
15144    #[doc = "A bitfield for use for autopilot-specific flags."]
15145    pub custom_mode: u32,
15146    #[doc = "Latitude"]
15147    pub latitude: i32,
15148    #[doc = "Longitude"]
15149    pub longitude: i32,
15150    #[doc = "roll"]
15151    pub roll: i16,
15152    #[doc = "pitch"]
15153    pub pitch: i16,
15154    #[doc = "heading"]
15155    pub heading: u16,
15156    #[doc = "heading setpoint"]
15157    pub heading_sp: i16,
15158    #[doc = "Altitude above mean sea level"]
15159    pub altitude_amsl: i16,
15160    #[doc = "Altitude setpoint relative to the home position"]
15161    pub altitude_sp: i16,
15162    #[doc = "distance to target"]
15163    pub wp_distance: u16,
15164    #[doc = "Bitmap of enabled system modes."]
15165    pub base_mode: MavModeFlag,
15166    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
15167    pub landed_state: MavLandedState,
15168    #[doc = "throttle (percentage)"]
15169    pub throttle: i8,
15170    #[doc = "airspeed"]
15171    pub airspeed: u8,
15172    #[doc = "airspeed setpoint"]
15173    pub airspeed_sp: u8,
15174    #[doc = "groundspeed"]
15175    pub groundspeed: u8,
15176    #[doc = "climb rate"]
15177    pub climb_rate: i8,
15178    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15179    pub gps_nsat: u8,
15180    #[doc = "GPS Fix type."]
15181    pub gps_fix_type: GpsFixType,
15182    #[doc = "Remaining battery (percentage)"]
15183    pub battery_remaining: u8,
15184    #[doc = "Autopilot temperature (degrees C)"]
15185    pub temperature: i8,
15186    #[doc = "Air temperature (degrees C) from airspeed sensor"]
15187    pub temperature_air: i8,
15188    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
15189    pub failsafe: u8,
15190    #[doc = "current waypoint number"]
15191    pub wp_num: u8,
15192}
15193impl HIGH_LATENCY_DATA {
15194    pub const ENCODED_LEN: usize = 40usize;
15195    pub const DEFAULT: Self = Self {
15196        custom_mode: 0_u32,
15197        latitude: 0_i32,
15198        longitude: 0_i32,
15199        roll: 0_i16,
15200        pitch: 0_i16,
15201        heading: 0_u16,
15202        heading_sp: 0_i16,
15203        altitude_amsl: 0_i16,
15204        altitude_sp: 0_i16,
15205        wp_distance: 0_u16,
15206        base_mode: MavModeFlag::DEFAULT,
15207        landed_state: MavLandedState::DEFAULT,
15208        throttle: 0_i8,
15209        airspeed: 0_u8,
15210        airspeed_sp: 0_u8,
15211        groundspeed: 0_u8,
15212        climb_rate: 0_i8,
15213        gps_nsat: 0_u8,
15214        gps_fix_type: GpsFixType::DEFAULT,
15215        battery_remaining: 0_u8,
15216        temperature: 0_i8,
15217        temperature_air: 0_i8,
15218        failsafe: 0_u8,
15219        wp_num: 0_u8,
15220    };
15221    #[cfg(feature = "arbitrary")]
15222    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15223        use arbitrary::{Arbitrary, Unstructured};
15224        let mut buf = [0u8; 1024];
15225        rng.fill_bytes(&mut buf);
15226        let mut unstructured = Unstructured::new(&buf);
15227        Self::arbitrary(&mut unstructured).unwrap_or_default()
15228    }
15229}
15230impl Default for HIGH_LATENCY_DATA {
15231    fn default() -> Self {
15232        Self::DEFAULT.clone()
15233    }
15234}
15235impl MessageData for HIGH_LATENCY_DATA {
15236    type Message = MavMessage;
15237    const ID: u32 = 234u32;
15238    const NAME: &'static str = "HIGH_LATENCY";
15239    const EXTRA_CRC: u8 = 150u8;
15240    const ENCODED_LEN: usize = 40usize;
15241    fn deser(
15242        _version: MavlinkVersion,
15243        __input: &[u8],
15244    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15245        let avail_len = __input.len();
15246        let mut payload_buf = [0; Self::ENCODED_LEN];
15247        let mut buf = if avail_len < Self::ENCODED_LEN {
15248            payload_buf[0..avail_len].copy_from_slice(__input);
15249            Bytes::new(&payload_buf)
15250        } else {
15251            Bytes::new(__input)
15252        };
15253        let mut __struct = Self::default();
15254        __struct.custom_mode = buf.get_u32_le();
15255        __struct.latitude = buf.get_i32_le();
15256        __struct.longitude = buf.get_i32_le();
15257        __struct.roll = buf.get_i16_le();
15258        __struct.pitch = buf.get_i16_le();
15259        __struct.heading = buf.get_u16_le();
15260        __struct.heading_sp = buf.get_i16_le();
15261        __struct.altitude_amsl = buf.get_i16_le();
15262        __struct.altitude_sp = buf.get_i16_le();
15263        __struct.wp_distance = buf.get_u16_le();
15264        let tmp = buf.get_u8();
15265        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15266            ::mavlink_core::error::ParserError::InvalidFlag {
15267                flag_type: "MavModeFlag",
15268                value: tmp as u32,
15269            },
15270        )?;
15271        let tmp = buf.get_u8();
15272        __struct.landed_state =
15273            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15274                enum_type: "MavLandedState",
15275                value: tmp as u32,
15276            })?;
15277        __struct.throttle = buf.get_i8();
15278        __struct.airspeed = buf.get_u8();
15279        __struct.airspeed_sp = buf.get_u8();
15280        __struct.groundspeed = buf.get_u8();
15281        __struct.climb_rate = buf.get_i8();
15282        __struct.gps_nsat = buf.get_u8();
15283        let tmp = buf.get_u8();
15284        __struct.gps_fix_type =
15285            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15286                enum_type: "GpsFixType",
15287                value: tmp as u32,
15288            })?;
15289        __struct.battery_remaining = buf.get_u8();
15290        __struct.temperature = buf.get_i8();
15291        __struct.temperature_air = buf.get_i8();
15292        __struct.failsafe = buf.get_u8();
15293        __struct.wp_num = buf.get_u8();
15294        Ok(__struct)
15295    }
15296    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15297        let mut __tmp = BytesMut::new(bytes);
15298        #[allow(clippy::absurd_extreme_comparisons)]
15299        #[allow(unused_comparisons)]
15300        if __tmp.remaining() < Self::ENCODED_LEN {
15301            panic!(
15302                "buffer is too small (need {} bytes, but got {})",
15303                Self::ENCODED_LEN,
15304                __tmp.remaining(),
15305            )
15306        }
15307        __tmp.put_u32_le(self.custom_mode);
15308        __tmp.put_i32_le(self.latitude);
15309        __tmp.put_i32_le(self.longitude);
15310        __tmp.put_i16_le(self.roll);
15311        __tmp.put_i16_le(self.pitch);
15312        __tmp.put_u16_le(self.heading);
15313        __tmp.put_i16_le(self.heading_sp);
15314        __tmp.put_i16_le(self.altitude_amsl);
15315        __tmp.put_i16_le(self.altitude_sp);
15316        __tmp.put_u16_le(self.wp_distance);
15317        __tmp.put_u8(self.base_mode.bits());
15318        __tmp.put_u8(self.landed_state as u8);
15319        __tmp.put_i8(self.throttle);
15320        __tmp.put_u8(self.airspeed);
15321        __tmp.put_u8(self.airspeed_sp);
15322        __tmp.put_u8(self.groundspeed);
15323        __tmp.put_i8(self.climb_rate);
15324        __tmp.put_u8(self.gps_nsat);
15325        __tmp.put_u8(self.gps_fix_type as u8);
15326        __tmp.put_u8(self.battery_remaining);
15327        __tmp.put_i8(self.temperature);
15328        __tmp.put_i8(self.temperature_air);
15329        __tmp.put_u8(self.failsafe);
15330        __tmp.put_u8(self.wp_num);
15331        if matches!(version, MavlinkVersion::V2) {
15332            let len = __tmp.len();
15333            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15334        } else {
15335            __tmp.len()
15336        }
15337    }
15338}
15339#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
15340#[doc = ""]
15341#[doc = "ID: 235"]
15342#[derive(Debug, Clone, PartialEq)]
15343#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15344#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15345#[cfg_attr(feature = "ts", derive(TS))]
15346#[cfg_attr(feature = "ts", ts(export))]
15347pub struct HIGH_LATENCY2_DATA {
15348    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
15349    pub timestamp: u32,
15350    #[doc = "Latitude"]
15351    pub latitude: i32,
15352    #[doc = "Longitude"]
15353    pub longitude: i32,
15354    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
15355    pub custom_mode: u16,
15356    #[doc = "Altitude above mean sea level"]
15357    pub altitude: i16,
15358    #[doc = "Altitude setpoint"]
15359    pub target_altitude: i16,
15360    #[doc = "Distance to target waypoint or position"]
15361    pub target_distance: u16,
15362    #[doc = "Current waypoint number"]
15363    pub wp_num: u16,
15364    #[doc = "Bitmap of failure flags."]
15365    pub failure_flags: HlFailureFlag,
15366    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
15367    pub mavtype: MavType,
15368    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15369    pub autopilot: MavAutopilot,
15370    #[doc = "Heading"]
15371    pub heading: u8,
15372    #[doc = "Heading setpoint"]
15373    pub target_heading: u8,
15374    #[doc = "Throttle"]
15375    pub throttle: u8,
15376    #[doc = "Airspeed"]
15377    pub airspeed: u8,
15378    #[doc = "Airspeed setpoint"]
15379    pub airspeed_sp: u8,
15380    #[doc = "Groundspeed"]
15381    pub groundspeed: u8,
15382    #[doc = "Windspeed"]
15383    pub windspeed: u8,
15384    #[doc = "Wind heading"]
15385    pub wind_heading: u8,
15386    #[doc = "Maximum error horizontal position since last message"]
15387    pub eph: u8,
15388    #[doc = "Maximum error vertical position since last message"]
15389    pub epv: u8,
15390    #[doc = "Air temperature"]
15391    pub temperature_air: i8,
15392    #[doc = "Maximum climb rate magnitude since last message"]
15393    pub climb_rate: i8,
15394    #[doc = "Battery level (-1 if field not provided)."]
15395    pub battery: i8,
15396    #[doc = "Field for custom payload."]
15397    pub custom0: i8,
15398    #[doc = "Field for custom payload."]
15399    pub custom1: i8,
15400    #[doc = "Field for custom payload."]
15401    pub custom2: i8,
15402}
15403impl HIGH_LATENCY2_DATA {
15404    pub const ENCODED_LEN: usize = 42usize;
15405    pub const DEFAULT: Self = Self {
15406        timestamp: 0_u32,
15407        latitude: 0_i32,
15408        longitude: 0_i32,
15409        custom_mode: 0_u16,
15410        altitude: 0_i16,
15411        target_altitude: 0_i16,
15412        target_distance: 0_u16,
15413        wp_num: 0_u16,
15414        failure_flags: HlFailureFlag::DEFAULT,
15415        mavtype: MavType::DEFAULT,
15416        autopilot: MavAutopilot::DEFAULT,
15417        heading: 0_u8,
15418        target_heading: 0_u8,
15419        throttle: 0_u8,
15420        airspeed: 0_u8,
15421        airspeed_sp: 0_u8,
15422        groundspeed: 0_u8,
15423        windspeed: 0_u8,
15424        wind_heading: 0_u8,
15425        eph: 0_u8,
15426        epv: 0_u8,
15427        temperature_air: 0_i8,
15428        climb_rate: 0_i8,
15429        battery: 0_i8,
15430        custom0: 0_i8,
15431        custom1: 0_i8,
15432        custom2: 0_i8,
15433    };
15434    #[cfg(feature = "arbitrary")]
15435    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15436        use arbitrary::{Arbitrary, Unstructured};
15437        let mut buf = [0u8; 1024];
15438        rng.fill_bytes(&mut buf);
15439        let mut unstructured = Unstructured::new(&buf);
15440        Self::arbitrary(&mut unstructured).unwrap_or_default()
15441    }
15442}
15443impl Default for HIGH_LATENCY2_DATA {
15444    fn default() -> Self {
15445        Self::DEFAULT.clone()
15446    }
15447}
15448impl MessageData for HIGH_LATENCY2_DATA {
15449    type Message = MavMessage;
15450    const ID: u32 = 235u32;
15451    const NAME: &'static str = "HIGH_LATENCY2";
15452    const EXTRA_CRC: u8 = 179u8;
15453    const ENCODED_LEN: usize = 42usize;
15454    fn deser(
15455        _version: MavlinkVersion,
15456        __input: &[u8],
15457    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15458        let avail_len = __input.len();
15459        let mut payload_buf = [0; Self::ENCODED_LEN];
15460        let mut buf = if avail_len < Self::ENCODED_LEN {
15461            payload_buf[0..avail_len].copy_from_slice(__input);
15462            Bytes::new(&payload_buf)
15463        } else {
15464            Bytes::new(__input)
15465        };
15466        let mut __struct = Self::default();
15467        __struct.timestamp = buf.get_u32_le();
15468        __struct.latitude = buf.get_i32_le();
15469        __struct.longitude = buf.get_i32_le();
15470        __struct.custom_mode = buf.get_u16_le();
15471        __struct.altitude = buf.get_i16_le();
15472        __struct.target_altitude = buf.get_i16_le();
15473        __struct.target_distance = buf.get_u16_le();
15474        __struct.wp_num = buf.get_u16_le();
15475        let tmp = buf.get_u16_le();
15476        __struct.failure_flags = HlFailureFlag::from_bits(tmp & HlFailureFlag::all().bits())
15477            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15478                flag_type: "HlFailureFlag",
15479                value: tmp as u32,
15480            })?;
15481        let tmp = buf.get_u8();
15482        __struct.mavtype =
15483            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15484                enum_type: "MavType",
15485                value: tmp as u32,
15486            })?;
15487        let tmp = buf.get_u8();
15488        __struct.autopilot =
15489            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15490                enum_type: "MavAutopilot",
15491                value: tmp as u32,
15492            })?;
15493        __struct.heading = buf.get_u8();
15494        __struct.target_heading = buf.get_u8();
15495        __struct.throttle = buf.get_u8();
15496        __struct.airspeed = buf.get_u8();
15497        __struct.airspeed_sp = buf.get_u8();
15498        __struct.groundspeed = buf.get_u8();
15499        __struct.windspeed = buf.get_u8();
15500        __struct.wind_heading = buf.get_u8();
15501        __struct.eph = buf.get_u8();
15502        __struct.epv = buf.get_u8();
15503        __struct.temperature_air = buf.get_i8();
15504        __struct.climb_rate = buf.get_i8();
15505        __struct.battery = buf.get_i8();
15506        __struct.custom0 = buf.get_i8();
15507        __struct.custom1 = buf.get_i8();
15508        __struct.custom2 = buf.get_i8();
15509        Ok(__struct)
15510    }
15511    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15512        let mut __tmp = BytesMut::new(bytes);
15513        #[allow(clippy::absurd_extreme_comparisons)]
15514        #[allow(unused_comparisons)]
15515        if __tmp.remaining() < Self::ENCODED_LEN {
15516            panic!(
15517                "buffer is too small (need {} bytes, but got {})",
15518                Self::ENCODED_LEN,
15519                __tmp.remaining(),
15520            )
15521        }
15522        __tmp.put_u32_le(self.timestamp);
15523        __tmp.put_i32_le(self.latitude);
15524        __tmp.put_i32_le(self.longitude);
15525        __tmp.put_u16_le(self.custom_mode);
15526        __tmp.put_i16_le(self.altitude);
15527        __tmp.put_i16_le(self.target_altitude);
15528        __tmp.put_u16_le(self.target_distance);
15529        __tmp.put_u16_le(self.wp_num);
15530        __tmp.put_u16_le(self.failure_flags.bits());
15531        __tmp.put_u8(self.mavtype as u8);
15532        __tmp.put_u8(self.autopilot as u8);
15533        __tmp.put_u8(self.heading);
15534        __tmp.put_u8(self.target_heading);
15535        __tmp.put_u8(self.throttle);
15536        __tmp.put_u8(self.airspeed);
15537        __tmp.put_u8(self.airspeed_sp);
15538        __tmp.put_u8(self.groundspeed);
15539        __tmp.put_u8(self.windspeed);
15540        __tmp.put_u8(self.wind_heading);
15541        __tmp.put_u8(self.eph);
15542        __tmp.put_u8(self.epv);
15543        __tmp.put_i8(self.temperature_air);
15544        __tmp.put_i8(self.climb_rate);
15545        __tmp.put_i8(self.battery);
15546        __tmp.put_i8(self.custom0);
15547        __tmp.put_i8(self.custom1);
15548        __tmp.put_i8(self.custom2);
15549        if matches!(version, MavlinkVersion::V2) {
15550            let len = __tmp.len();
15551            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15552        } else {
15553            __tmp.len()
15554        }
15555    }
15556}
15557#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
15558#[doc = ""]
15559#[doc = "ID: 93"]
15560#[derive(Debug, Clone, PartialEq)]
15561#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15562#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15563#[cfg_attr(feature = "ts", derive(TS))]
15564#[cfg_attr(feature = "ts", ts(export))]
15565pub struct HIL_ACTUATOR_CONTROLS_DATA {
15566    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15567    pub time_usec: u64,
15568    #[doc = "Flags bitmask."]
15569    pub flags: HilActuatorControlsFlags,
15570    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
15571    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15572    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15573    pub controls: [f32; 16],
15574    #[doc = "System mode. Includes arming state."]
15575    pub mode: MavModeFlag,
15576}
15577impl HIL_ACTUATOR_CONTROLS_DATA {
15578    pub const ENCODED_LEN: usize = 81usize;
15579    pub const DEFAULT: Self = Self {
15580        time_usec: 0_u64,
15581        flags: HilActuatorControlsFlags::DEFAULT,
15582        controls: [0.0_f32; 16usize],
15583        mode: MavModeFlag::DEFAULT,
15584    };
15585    #[cfg(feature = "arbitrary")]
15586    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15587        use arbitrary::{Arbitrary, Unstructured};
15588        let mut buf = [0u8; 1024];
15589        rng.fill_bytes(&mut buf);
15590        let mut unstructured = Unstructured::new(&buf);
15591        Self::arbitrary(&mut unstructured).unwrap_or_default()
15592    }
15593}
15594impl Default for HIL_ACTUATOR_CONTROLS_DATA {
15595    fn default() -> Self {
15596        Self::DEFAULT.clone()
15597    }
15598}
15599impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
15600    type Message = MavMessage;
15601    const ID: u32 = 93u32;
15602    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
15603    const EXTRA_CRC: u8 = 47u8;
15604    const ENCODED_LEN: usize = 81usize;
15605    fn deser(
15606        _version: MavlinkVersion,
15607        __input: &[u8],
15608    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15609        let avail_len = __input.len();
15610        let mut payload_buf = [0; Self::ENCODED_LEN];
15611        let mut buf = if avail_len < Self::ENCODED_LEN {
15612            payload_buf[0..avail_len].copy_from_slice(__input);
15613            Bytes::new(&payload_buf)
15614        } else {
15615            Bytes::new(__input)
15616        };
15617        let mut __struct = Self::default();
15618        __struct.time_usec = buf.get_u64_le();
15619        let tmp = buf.get_u64_le();
15620        __struct.flags =
15621            HilActuatorControlsFlags::from_bits(tmp & HilActuatorControlsFlags::all().bits())
15622                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15623                    flag_type: "HilActuatorControlsFlags",
15624                    value: tmp as u32,
15625                })?;
15626        for v in &mut __struct.controls {
15627            let val = buf.get_f32_le();
15628            *v = val;
15629        }
15630        let tmp = buf.get_u8();
15631        __struct.mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15632            ::mavlink_core::error::ParserError::InvalidFlag {
15633                flag_type: "MavModeFlag",
15634                value: tmp as u32,
15635            },
15636        )?;
15637        Ok(__struct)
15638    }
15639    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15640        let mut __tmp = BytesMut::new(bytes);
15641        #[allow(clippy::absurd_extreme_comparisons)]
15642        #[allow(unused_comparisons)]
15643        if __tmp.remaining() < Self::ENCODED_LEN {
15644            panic!(
15645                "buffer is too small (need {} bytes, but got {})",
15646                Self::ENCODED_LEN,
15647                __tmp.remaining(),
15648            )
15649        }
15650        __tmp.put_u64_le(self.time_usec);
15651        __tmp.put_u64_le(self.flags.bits());
15652        for val in &self.controls {
15653            __tmp.put_f32_le(*val);
15654        }
15655        __tmp.put_u8(self.mode.bits());
15656        if matches!(version, MavlinkVersion::V2) {
15657            let len = __tmp.len();
15658            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15659        } else {
15660            __tmp.len()
15661        }
15662    }
15663}
15664#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
15665#[doc = ""]
15666#[doc = "ID: 91"]
15667#[derive(Debug, Clone, PartialEq)]
15668#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15669#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15670#[cfg_attr(feature = "ts", derive(TS))]
15671#[cfg_attr(feature = "ts", ts(export))]
15672pub struct HIL_CONTROLS_DATA {
15673    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15674    pub time_usec: u64,
15675    #[doc = "Control output -1 .. 1"]
15676    pub roll_ailerons: f32,
15677    #[doc = "Control output -1 .. 1"]
15678    pub pitch_elevator: f32,
15679    #[doc = "Control output -1 .. 1"]
15680    pub yaw_rudder: f32,
15681    #[doc = "Throttle 0 .. 1"]
15682    pub throttle: f32,
15683    #[doc = "Aux 1, -1 .. 1"]
15684    pub aux1: f32,
15685    #[doc = "Aux 2, -1 .. 1"]
15686    pub aux2: f32,
15687    #[doc = "Aux 3, -1 .. 1"]
15688    pub aux3: f32,
15689    #[doc = "Aux 4, -1 .. 1"]
15690    pub aux4: f32,
15691    #[doc = "System mode."]
15692    pub mode: MavMode,
15693    #[doc = "Navigation mode (MAV_NAV_MODE)"]
15694    pub nav_mode: u8,
15695}
15696impl HIL_CONTROLS_DATA {
15697    pub const ENCODED_LEN: usize = 42usize;
15698    pub const DEFAULT: Self = Self {
15699        time_usec: 0_u64,
15700        roll_ailerons: 0.0_f32,
15701        pitch_elevator: 0.0_f32,
15702        yaw_rudder: 0.0_f32,
15703        throttle: 0.0_f32,
15704        aux1: 0.0_f32,
15705        aux2: 0.0_f32,
15706        aux3: 0.0_f32,
15707        aux4: 0.0_f32,
15708        mode: MavMode::DEFAULT,
15709        nav_mode: 0_u8,
15710    };
15711    #[cfg(feature = "arbitrary")]
15712    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15713        use arbitrary::{Arbitrary, Unstructured};
15714        let mut buf = [0u8; 1024];
15715        rng.fill_bytes(&mut buf);
15716        let mut unstructured = Unstructured::new(&buf);
15717        Self::arbitrary(&mut unstructured).unwrap_or_default()
15718    }
15719}
15720impl Default for HIL_CONTROLS_DATA {
15721    fn default() -> Self {
15722        Self::DEFAULT.clone()
15723    }
15724}
15725impl MessageData for HIL_CONTROLS_DATA {
15726    type Message = MavMessage;
15727    const ID: u32 = 91u32;
15728    const NAME: &'static str = "HIL_CONTROLS";
15729    const EXTRA_CRC: u8 = 63u8;
15730    const ENCODED_LEN: usize = 42usize;
15731    fn deser(
15732        _version: MavlinkVersion,
15733        __input: &[u8],
15734    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15735        let avail_len = __input.len();
15736        let mut payload_buf = [0; Self::ENCODED_LEN];
15737        let mut buf = if avail_len < Self::ENCODED_LEN {
15738            payload_buf[0..avail_len].copy_from_slice(__input);
15739            Bytes::new(&payload_buf)
15740        } else {
15741            Bytes::new(__input)
15742        };
15743        let mut __struct = Self::default();
15744        __struct.time_usec = buf.get_u64_le();
15745        __struct.roll_ailerons = buf.get_f32_le();
15746        __struct.pitch_elevator = buf.get_f32_le();
15747        __struct.yaw_rudder = buf.get_f32_le();
15748        __struct.throttle = buf.get_f32_le();
15749        __struct.aux1 = buf.get_f32_le();
15750        __struct.aux2 = buf.get_f32_le();
15751        __struct.aux3 = buf.get_f32_le();
15752        __struct.aux4 = buf.get_f32_le();
15753        let tmp = buf.get_u8();
15754        __struct.mode =
15755            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15756                enum_type: "MavMode",
15757                value: tmp as u32,
15758            })?;
15759        __struct.nav_mode = buf.get_u8();
15760        Ok(__struct)
15761    }
15762    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15763        let mut __tmp = BytesMut::new(bytes);
15764        #[allow(clippy::absurd_extreme_comparisons)]
15765        #[allow(unused_comparisons)]
15766        if __tmp.remaining() < Self::ENCODED_LEN {
15767            panic!(
15768                "buffer is too small (need {} bytes, but got {})",
15769                Self::ENCODED_LEN,
15770                __tmp.remaining(),
15771            )
15772        }
15773        __tmp.put_u64_le(self.time_usec);
15774        __tmp.put_f32_le(self.roll_ailerons);
15775        __tmp.put_f32_le(self.pitch_elevator);
15776        __tmp.put_f32_le(self.yaw_rudder);
15777        __tmp.put_f32_le(self.throttle);
15778        __tmp.put_f32_le(self.aux1);
15779        __tmp.put_f32_le(self.aux2);
15780        __tmp.put_f32_le(self.aux3);
15781        __tmp.put_f32_le(self.aux4);
15782        __tmp.put_u8(self.mode as u8);
15783        __tmp.put_u8(self.nav_mode);
15784        if matches!(version, MavlinkVersion::V2) {
15785            let len = __tmp.len();
15786            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15787        } else {
15788            __tmp.len()
15789        }
15790    }
15791}
15792#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
15793#[doc = ""]
15794#[doc = "ID: 113"]
15795#[derive(Debug, Clone, PartialEq)]
15796#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15798#[cfg_attr(feature = "ts", derive(TS))]
15799#[cfg_attr(feature = "ts", ts(export))]
15800pub struct HIL_GPS_DATA {
15801    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15802    pub time_usec: u64,
15803    #[doc = "Latitude (WGS84)"]
15804    pub lat: i32,
15805    #[doc = "Longitude (WGS84)"]
15806    pub lon: i32,
15807    #[doc = "Altitude (MSL). Positive for up."]
15808    pub alt: i32,
15809    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15810    pub eph: u16,
15811    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15812    pub epv: u16,
15813    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
15814    pub vel: u16,
15815    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
15816    pub vn: i16,
15817    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
15818    pub ve: i16,
15819    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
15820    pub vd: i16,
15821    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15822    pub cog: u16,
15823    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
15824    pub fix_type: u8,
15825    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15826    pub satellites_visible: u8,
15827    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
15828    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15829    pub id: u8,
15830    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
15831    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15832    pub yaw: u16,
15833}
15834impl HIL_GPS_DATA {
15835    pub const ENCODED_LEN: usize = 39usize;
15836    pub const DEFAULT: Self = Self {
15837        time_usec: 0_u64,
15838        lat: 0_i32,
15839        lon: 0_i32,
15840        alt: 0_i32,
15841        eph: 0_u16,
15842        epv: 0_u16,
15843        vel: 0_u16,
15844        vn: 0_i16,
15845        ve: 0_i16,
15846        vd: 0_i16,
15847        cog: 0_u16,
15848        fix_type: 0_u8,
15849        satellites_visible: 0_u8,
15850        id: 0_u8,
15851        yaw: 0_u16,
15852    };
15853    #[cfg(feature = "arbitrary")]
15854    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15855        use arbitrary::{Arbitrary, Unstructured};
15856        let mut buf = [0u8; 1024];
15857        rng.fill_bytes(&mut buf);
15858        let mut unstructured = Unstructured::new(&buf);
15859        Self::arbitrary(&mut unstructured).unwrap_or_default()
15860    }
15861}
15862impl Default for HIL_GPS_DATA {
15863    fn default() -> Self {
15864        Self::DEFAULT.clone()
15865    }
15866}
15867impl MessageData for HIL_GPS_DATA {
15868    type Message = MavMessage;
15869    const ID: u32 = 113u32;
15870    const NAME: &'static str = "HIL_GPS";
15871    const EXTRA_CRC: u8 = 124u8;
15872    const ENCODED_LEN: usize = 39usize;
15873    fn deser(
15874        _version: MavlinkVersion,
15875        __input: &[u8],
15876    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15877        let avail_len = __input.len();
15878        let mut payload_buf = [0; Self::ENCODED_LEN];
15879        let mut buf = if avail_len < Self::ENCODED_LEN {
15880            payload_buf[0..avail_len].copy_from_slice(__input);
15881            Bytes::new(&payload_buf)
15882        } else {
15883            Bytes::new(__input)
15884        };
15885        let mut __struct = Self::default();
15886        __struct.time_usec = buf.get_u64_le();
15887        __struct.lat = buf.get_i32_le();
15888        __struct.lon = buf.get_i32_le();
15889        __struct.alt = buf.get_i32_le();
15890        __struct.eph = buf.get_u16_le();
15891        __struct.epv = buf.get_u16_le();
15892        __struct.vel = buf.get_u16_le();
15893        __struct.vn = buf.get_i16_le();
15894        __struct.ve = buf.get_i16_le();
15895        __struct.vd = buf.get_i16_le();
15896        __struct.cog = buf.get_u16_le();
15897        __struct.fix_type = buf.get_u8();
15898        __struct.satellites_visible = buf.get_u8();
15899        __struct.id = buf.get_u8();
15900        __struct.yaw = buf.get_u16_le();
15901        Ok(__struct)
15902    }
15903    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15904        let mut __tmp = BytesMut::new(bytes);
15905        #[allow(clippy::absurd_extreme_comparisons)]
15906        #[allow(unused_comparisons)]
15907        if __tmp.remaining() < Self::ENCODED_LEN {
15908            panic!(
15909                "buffer is too small (need {} bytes, but got {})",
15910                Self::ENCODED_LEN,
15911                __tmp.remaining(),
15912            )
15913        }
15914        __tmp.put_u64_le(self.time_usec);
15915        __tmp.put_i32_le(self.lat);
15916        __tmp.put_i32_le(self.lon);
15917        __tmp.put_i32_le(self.alt);
15918        __tmp.put_u16_le(self.eph);
15919        __tmp.put_u16_le(self.epv);
15920        __tmp.put_u16_le(self.vel);
15921        __tmp.put_i16_le(self.vn);
15922        __tmp.put_i16_le(self.ve);
15923        __tmp.put_i16_le(self.vd);
15924        __tmp.put_u16_le(self.cog);
15925        __tmp.put_u8(self.fix_type);
15926        __tmp.put_u8(self.satellites_visible);
15927        if matches!(version, MavlinkVersion::V2) {
15928            __tmp.put_u8(self.id);
15929            __tmp.put_u16_le(self.yaw);
15930            let len = __tmp.len();
15931            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15932        } else {
15933            __tmp.len()
15934        }
15935    }
15936}
15937#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
15938#[doc = ""]
15939#[doc = "ID: 114"]
15940#[derive(Debug, Clone, PartialEq)]
15941#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15942#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15943#[cfg_attr(feature = "ts", derive(TS))]
15944#[cfg_attr(feature = "ts", ts(export))]
15945pub struct HIL_OPTICAL_FLOW_DATA {
15946    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15947    pub time_usec: u64,
15948    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
15949    pub integration_time_us: u32,
15950    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
15951    pub integrated_x: f32,
15952    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
15953    pub integrated_y: f32,
15954    #[doc = "RH rotation around X axis"]
15955    pub integrated_xgyro: f32,
15956    #[doc = "RH rotation around Y axis"]
15957    pub integrated_ygyro: f32,
15958    #[doc = "RH rotation around Z axis"]
15959    pub integrated_zgyro: f32,
15960    #[doc = "Time since the distance was sampled."]
15961    pub time_delta_distance_us: u32,
15962    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
15963    pub distance: f32,
15964    #[doc = "Temperature"]
15965    pub temperature: i16,
15966    #[doc = "Sensor ID"]
15967    pub sensor_id: u8,
15968    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
15969    pub quality: u8,
15970}
15971impl HIL_OPTICAL_FLOW_DATA {
15972    pub const ENCODED_LEN: usize = 44usize;
15973    pub const DEFAULT: Self = Self {
15974        time_usec: 0_u64,
15975        integration_time_us: 0_u32,
15976        integrated_x: 0.0_f32,
15977        integrated_y: 0.0_f32,
15978        integrated_xgyro: 0.0_f32,
15979        integrated_ygyro: 0.0_f32,
15980        integrated_zgyro: 0.0_f32,
15981        time_delta_distance_us: 0_u32,
15982        distance: 0.0_f32,
15983        temperature: 0_i16,
15984        sensor_id: 0_u8,
15985        quality: 0_u8,
15986    };
15987    #[cfg(feature = "arbitrary")]
15988    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15989        use arbitrary::{Arbitrary, Unstructured};
15990        let mut buf = [0u8; 1024];
15991        rng.fill_bytes(&mut buf);
15992        let mut unstructured = Unstructured::new(&buf);
15993        Self::arbitrary(&mut unstructured).unwrap_or_default()
15994    }
15995}
15996impl Default for HIL_OPTICAL_FLOW_DATA {
15997    fn default() -> Self {
15998        Self::DEFAULT.clone()
15999    }
16000}
16001impl MessageData for HIL_OPTICAL_FLOW_DATA {
16002    type Message = MavMessage;
16003    const ID: u32 = 114u32;
16004    const NAME: &'static str = "HIL_OPTICAL_FLOW";
16005    const EXTRA_CRC: u8 = 237u8;
16006    const ENCODED_LEN: usize = 44usize;
16007    fn deser(
16008        _version: MavlinkVersion,
16009        __input: &[u8],
16010    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16011        let avail_len = __input.len();
16012        let mut payload_buf = [0; Self::ENCODED_LEN];
16013        let mut buf = if avail_len < Self::ENCODED_LEN {
16014            payload_buf[0..avail_len].copy_from_slice(__input);
16015            Bytes::new(&payload_buf)
16016        } else {
16017            Bytes::new(__input)
16018        };
16019        let mut __struct = Self::default();
16020        __struct.time_usec = buf.get_u64_le();
16021        __struct.integration_time_us = buf.get_u32_le();
16022        __struct.integrated_x = buf.get_f32_le();
16023        __struct.integrated_y = buf.get_f32_le();
16024        __struct.integrated_xgyro = buf.get_f32_le();
16025        __struct.integrated_ygyro = buf.get_f32_le();
16026        __struct.integrated_zgyro = buf.get_f32_le();
16027        __struct.time_delta_distance_us = buf.get_u32_le();
16028        __struct.distance = buf.get_f32_le();
16029        __struct.temperature = buf.get_i16_le();
16030        __struct.sensor_id = buf.get_u8();
16031        __struct.quality = buf.get_u8();
16032        Ok(__struct)
16033    }
16034    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16035        let mut __tmp = BytesMut::new(bytes);
16036        #[allow(clippy::absurd_extreme_comparisons)]
16037        #[allow(unused_comparisons)]
16038        if __tmp.remaining() < Self::ENCODED_LEN {
16039            panic!(
16040                "buffer is too small (need {} bytes, but got {})",
16041                Self::ENCODED_LEN,
16042                __tmp.remaining(),
16043            )
16044        }
16045        __tmp.put_u64_le(self.time_usec);
16046        __tmp.put_u32_le(self.integration_time_us);
16047        __tmp.put_f32_le(self.integrated_x);
16048        __tmp.put_f32_le(self.integrated_y);
16049        __tmp.put_f32_le(self.integrated_xgyro);
16050        __tmp.put_f32_le(self.integrated_ygyro);
16051        __tmp.put_f32_le(self.integrated_zgyro);
16052        __tmp.put_u32_le(self.time_delta_distance_us);
16053        __tmp.put_f32_le(self.distance);
16054        __tmp.put_i16_le(self.temperature);
16055        __tmp.put_u8(self.sensor_id);
16056        __tmp.put_u8(self.quality);
16057        if matches!(version, MavlinkVersion::V2) {
16058            let len = __tmp.len();
16059            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16060        } else {
16061            __tmp.len()
16062        }
16063    }
16064}
16065#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
16066#[doc = ""]
16067#[doc = "ID: 92"]
16068#[derive(Debug, Clone, PartialEq)]
16069#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16070#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16071#[cfg_attr(feature = "ts", derive(TS))]
16072#[cfg_attr(feature = "ts", ts(export))]
16073pub struct HIL_RC_INPUTS_RAW_DATA {
16074    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16075    pub time_usec: u64,
16076    #[doc = "RC channel 1 value"]
16077    pub chan1_raw: u16,
16078    #[doc = "RC channel 2 value"]
16079    pub chan2_raw: u16,
16080    #[doc = "RC channel 3 value"]
16081    pub chan3_raw: u16,
16082    #[doc = "RC channel 4 value"]
16083    pub chan4_raw: u16,
16084    #[doc = "RC channel 5 value"]
16085    pub chan5_raw: u16,
16086    #[doc = "RC channel 6 value"]
16087    pub chan6_raw: u16,
16088    #[doc = "RC channel 7 value"]
16089    pub chan7_raw: u16,
16090    #[doc = "RC channel 8 value"]
16091    pub chan8_raw: u16,
16092    #[doc = "RC channel 9 value"]
16093    pub chan9_raw: u16,
16094    #[doc = "RC channel 10 value"]
16095    pub chan10_raw: u16,
16096    #[doc = "RC channel 11 value"]
16097    pub chan11_raw: u16,
16098    #[doc = "RC channel 12 value"]
16099    pub chan12_raw: u16,
16100    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16101    pub rssi: u8,
16102}
16103impl HIL_RC_INPUTS_RAW_DATA {
16104    pub const ENCODED_LEN: usize = 33usize;
16105    pub const DEFAULT: Self = Self {
16106        time_usec: 0_u64,
16107        chan1_raw: 0_u16,
16108        chan2_raw: 0_u16,
16109        chan3_raw: 0_u16,
16110        chan4_raw: 0_u16,
16111        chan5_raw: 0_u16,
16112        chan6_raw: 0_u16,
16113        chan7_raw: 0_u16,
16114        chan8_raw: 0_u16,
16115        chan9_raw: 0_u16,
16116        chan10_raw: 0_u16,
16117        chan11_raw: 0_u16,
16118        chan12_raw: 0_u16,
16119        rssi: 0_u8,
16120    };
16121    #[cfg(feature = "arbitrary")]
16122    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16123        use arbitrary::{Arbitrary, Unstructured};
16124        let mut buf = [0u8; 1024];
16125        rng.fill_bytes(&mut buf);
16126        let mut unstructured = Unstructured::new(&buf);
16127        Self::arbitrary(&mut unstructured).unwrap_or_default()
16128    }
16129}
16130impl Default for HIL_RC_INPUTS_RAW_DATA {
16131    fn default() -> Self {
16132        Self::DEFAULT.clone()
16133    }
16134}
16135impl MessageData for HIL_RC_INPUTS_RAW_DATA {
16136    type Message = MavMessage;
16137    const ID: u32 = 92u32;
16138    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
16139    const EXTRA_CRC: u8 = 54u8;
16140    const ENCODED_LEN: usize = 33usize;
16141    fn deser(
16142        _version: MavlinkVersion,
16143        __input: &[u8],
16144    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16145        let avail_len = __input.len();
16146        let mut payload_buf = [0; Self::ENCODED_LEN];
16147        let mut buf = if avail_len < Self::ENCODED_LEN {
16148            payload_buf[0..avail_len].copy_from_slice(__input);
16149            Bytes::new(&payload_buf)
16150        } else {
16151            Bytes::new(__input)
16152        };
16153        let mut __struct = Self::default();
16154        __struct.time_usec = buf.get_u64_le();
16155        __struct.chan1_raw = buf.get_u16_le();
16156        __struct.chan2_raw = buf.get_u16_le();
16157        __struct.chan3_raw = buf.get_u16_le();
16158        __struct.chan4_raw = buf.get_u16_le();
16159        __struct.chan5_raw = buf.get_u16_le();
16160        __struct.chan6_raw = buf.get_u16_le();
16161        __struct.chan7_raw = buf.get_u16_le();
16162        __struct.chan8_raw = buf.get_u16_le();
16163        __struct.chan9_raw = buf.get_u16_le();
16164        __struct.chan10_raw = buf.get_u16_le();
16165        __struct.chan11_raw = buf.get_u16_le();
16166        __struct.chan12_raw = buf.get_u16_le();
16167        __struct.rssi = buf.get_u8();
16168        Ok(__struct)
16169    }
16170    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16171        let mut __tmp = BytesMut::new(bytes);
16172        #[allow(clippy::absurd_extreme_comparisons)]
16173        #[allow(unused_comparisons)]
16174        if __tmp.remaining() < Self::ENCODED_LEN {
16175            panic!(
16176                "buffer is too small (need {} bytes, but got {})",
16177                Self::ENCODED_LEN,
16178                __tmp.remaining(),
16179            )
16180        }
16181        __tmp.put_u64_le(self.time_usec);
16182        __tmp.put_u16_le(self.chan1_raw);
16183        __tmp.put_u16_le(self.chan2_raw);
16184        __tmp.put_u16_le(self.chan3_raw);
16185        __tmp.put_u16_le(self.chan4_raw);
16186        __tmp.put_u16_le(self.chan5_raw);
16187        __tmp.put_u16_le(self.chan6_raw);
16188        __tmp.put_u16_le(self.chan7_raw);
16189        __tmp.put_u16_le(self.chan8_raw);
16190        __tmp.put_u16_le(self.chan9_raw);
16191        __tmp.put_u16_le(self.chan10_raw);
16192        __tmp.put_u16_le(self.chan11_raw);
16193        __tmp.put_u16_le(self.chan12_raw);
16194        __tmp.put_u8(self.rssi);
16195        if matches!(version, MavlinkVersion::V2) {
16196            let len = __tmp.len();
16197            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16198        } else {
16199            __tmp.len()
16200        }
16201    }
16202}
16203#[doc = "The IMU readings in SI units in NED body frame."]
16204#[doc = ""]
16205#[doc = "ID: 107"]
16206#[derive(Debug, Clone, PartialEq)]
16207#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16209#[cfg_attr(feature = "ts", derive(TS))]
16210#[cfg_attr(feature = "ts", ts(export))]
16211pub struct HIL_SENSOR_DATA {
16212    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16213    pub time_usec: u64,
16214    #[doc = "X acceleration"]
16215    pub xacc: f32,
16216    #[doc = "Y acceleration"]
16217    pub yacc: f32,
16218    #[doc = "Z acceleration"]
16219    pub zacc: f32,
16220    #[doc = "Angular speed around X axis in body frame"]
16221    pub xgyro: f32,
16222    #[doc = "Angular speed around Y axis in body frame"]
16223    pub ygyro: f32,
16224    #[doc = "Angular speed around Z axis in body frame"]
16225    pub zgyro: f32,
16226    #[doc = "X Magnetic field"]
16227    pub xmag: f32,
16228    #[doc = "Y Magnetic field"]
16229    pub ymag: f32,
16230    #[doc = "Z Magnetic field"]
16231    pub zmag: f32,
16232    #[doc = "Absolute pressure"]
16233    pub abs_pressure: f32,
16234    #[doc = "Differential pressure (airspeed)"]
16235    pub diff_pressure: f32,
16236    #[doc = "Altitude calculated from pressure"]
16237    pub pressure_alt: f32,
16238    #[doc = "Temperature"]
16239    pub temperature: f32,
16240    #[doc = "Bitmap for fields that have updated since last message"]
16241    pub fields_updated: HilSensorUpdatedFlags,
16242    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
16243    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16244    pub id: u8,
16245}
16246impl HIL_SENSOR_DATA {
16247    pub const ENCODED_LEN: usize = 65usize;
16248    pub const DEFAULT: Self = Self {
16249        time_usec: 0_u64,
16250        xacc: 0.0_f32,
16251        yacc: 0.0_f32,
16252        zacc: 0.0_f32,
16253        xgyro: 0.0_f32,
16254        ygyro: 0.0_f32,
16255        zgyro: 0.0_f32,
16256        xmag: 0.0_f32,
16257        ymag: 0.0_f32,
16258        zmag: 0.0_f32,
16259        abs_pressure: 0.0_f32,
16260        diff_pressure: 0.0_f32,
16261        pressure_alt: 0.0_f32,
16262        temperature: 0.0_f32,
16263        fields_updated: HilSensorUpdatedFlags::DEFAULT,
16264        id: 0_u8,
16265    };
16266    #[cfg(feature = "arbitrary")]
16267    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16268        use arbitrary::{Arbitrary, Unstructured};
16269        let mut buf = [0u8; 1024];
16270        rng.fill_bytes(&mut buf);
16271        let mut unstructured = Unstructured::new(&buf);
16272        Self::arbitrary(&mut unstructured).unwrap_or_default()
16273    }
16274}
16275impl Default for HIL_SENSOR_DATA {
16276    fn default() -> Self {
16277        Self::DEFAULT.clone()
16278    }
16279}
16280impl MessageData for HIL_SENSOR_DATA {
16281    type Message = MavMessage;
16282    const ID: u32 = 107u32;
16283    const NAME: &'static str = "HIL_SENSOR";
16284    const EXTRA_CRC: u8 = 108u8;
16285    const ENCODED_LEN: usize = 65usize;
16286    fn deser(
16287        _version: MavlinkVersion,
16288        __input: &[u8],
16289    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16290        let avail_len = __input.len();
16291        let mut payload_buf = [0; Self::ENCODED_LEN];
16292        let mut buf = if avail_len < Self::ENCODED_LEN {
16293            payload_buf[0..avail_len].copy_from_slice(__input);
16294            Bytes::new(&payload_buf)
16295        } else {
16296            Bytes::new(__input)
16297        };
16298        let mut __struct = Self::default();
16299        __struct.time_usec = buf.get_u64_le();
16300        __struct.xacc = buf.get_f32_le();
16301        __struct.yacc = buf.get_f32_le();
16302        __struct.zacc = buf.get_f32_le();
16303        __struct.xgyro = buf.get_f32_le();
16304        __struct.ygyro = buf.get_f32_le();
16305        __struct.zgyro = buf.get_f32_le();
16306        __struct.xmag = buf.get_f32_le();
16307        __struct.ymag = buf.get_f32_le();
16308        __struct.zmag = buf.get_f32_le();
16309        __struct.abs_pressure = buf.get_f32_le();
16310        __struct.diff_pressure = buf.get_f32_le();
16311        __struct.pressure_alt = buf.get_f32_le();
16312        __struct.temperature = buf.get_f32_le();
16313        let tmp = buf.get_u32_le();
16314        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
16315            tmp & HilSensorUpdatedFlags::all().bits(),
16316        )
16317        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16318            flag_type: "HilSensorUpdatedFlags",
16319            value: tmp as u32,
16320        })?;
16321        __struct.id = buf.get_u8();
16322        Ok(__struct)
16323    }
16324    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16325        let mut __tmp = BytesMut::new(bytes);
16326        #[allow(clippy::absurd_extreme_comparisons)]
16327        #[allow(unused_comparisons)]
16328        if __tmp.remaining() < Self::ENCODED_LEN {
16329            panic!(
16330                "buffer is too small (need {} bytes, but got {})",
16331                Self::ENCODED_LEN,
16332                __tmp.remaining(),
16333            )
16334        }
16335        __tmp.put_u64_le(self.time_usec);
16336        __tmp.put_f32_le(self.xacc);
16337        __tmp.put_f32_le(self.yacc);
16338        __tmp.put_f32_le(self.zacc);
16339        __tmp.put_f32_le(self.xgyro);
16340        __tmp.put_f32_le(self.ygyro);
16341        __tmp.put_f32_le(self.zgyro);
16342        __tmp.put_f32_le(self.xmag);
16343        __tmp.put_f32_le(self.ymag);
16344        __tmp.put_f32_le(self.zmag);
16345        __tmp.put_f32_le(self.abs_pressure);
16346        __tmp.put_f32_le(self.diff_pressure);
16347        __tmp.put_f32_le(self.pressure_alt);
16348        __tmp.put_f32_le(self.temperature);
16349        __tmp.put_u32_le(self.fields_updated.bits());
16350        if matches!(version, MavlinkVersion::V2) {
16351            __tmp.put_u8(self.id);
16352            let len = __tmp.len();
16353            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16354        } else {
16355            __tmp.len()
16356        }
16357    }
16358}
16359#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
16360#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16361#[doc = ""]
16362#[doc = "ID: 90"]
16363#[derive(Debug, Clone, PartialEq)]
16364#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16366#[cfg_attr(feature = "ts", derive(TS))]
16367#[cfg_attr(feature = "ts", ts(export))]
16368pub struct HIL_STATE_DATA {
16369    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16370    pub time_usec: u64,
16371    #[doc = "Roll angle"]
16372    pub roll: f32,
16373    #[doc = "Pitch angle"]
16374    pub pitch: f32,
16375    #[doc = "Yaw angle"]
16376    pub yaw: f32,
16377    #[doc = "Body frame roll / phi angular speed"]
16378    pub rollspeed: f32,
16379    #[doc = "Body frame pitch / theta angular speed"]
16380    pub pitchspeed: f32,
16381    #[doc = "Body frame yaw / psi angular speed"]
16382    pub yawspeed: f32,
16383    #[doc = "Latitude"]
16384    pub lat: i32,
16385    #[doc = "Longitude"]
16386    pub lon: i32,
16387    #[doc = "Altitude"]
16388    pub alt: i32,
16389    #[doc = "Ground X Speed (Latitude)"]
16390    pub vx: i16,
16391    #[doc = "Ground Y Speed (Longitude)"]
16392    pub vy: i16,
16393    #[doc = "Ground Z Speed (Altitude)"]
16394    pub vz: i16,
16395    #[doc = "X acceleration"]
16396    pub xacc: i16,
16397    #[doc = "Y acceleration"]
16398    pub yacc: i16,
16399    #[doc = "Z acceleration"]
16400    pub zacc: i16,
16401}
16402impl HIL_STATE_DATA {
16403    pub const ENCODED_LEN: usize = 56usize;
16404    pub const DEFAULT: Self = Self {
16405        time_usec: 0_u64,
16406        roll: 0.0_f32,
16407        pitch: 0.0_f32,
16408        yaw: 0.0_f32,
16409        rollspeed: 0.0_f32,
16410        pitchspeed: 0.0_f32,
16411        yawspeed: 0.0_f32,
16412        lat: 0_i32,
16413        lon: 0_i32,
16414        alt: 0_i32,
16415        vx: 0_i16,
16416        vy: 0_i16,
16417        vz: 0_i16,
16418        xacc: 0_i16,
16419        yacc: 0_i16,
16420        zacc: 0_i16,
16421    };
16422    #[cfg(feature = "arbitrary")]
16423    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16424        use arbitrary::{Arbitrary, Unstructured};
16425        let mut buf = [0u8; 1024];
16426        rng.fill_bytes(&mut buf);
16427        let mut unstructured = Unstructured::new(&buf);
16428        Self::arbitrary(&mut unstructured).unwrap_or_default()
16429    }
16430}
16431impl Default for HIL_STATE_DATA {
16432    fn default() -> Self {
16433        Self::DEFAULT.clone()
16434    }
16435}
16436impl MessageData for HIL_STATE_DATA {
16437    type Message = MavMessage;
16438    const ID: u32 = 90u32;
16439    const NAME: &'static str = "HIL_STATE";
16440    const EXTRA_CRC: u8 = 183u8;
16441    const ENCODED_LEN: usize = 56usize;
16442    fn deser(
16443        _version: MavlinkVersion,
16444        __input: &[u8],
16445    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16446        let avail_len = __input.len();
16447        let mut payload_buf = [0; Self::ENCODED_LEN];
16448        let mut buf = if avail_len < Self::ENCODED_LEN {
16449            payload_buf[0..avail_len].copy_from_slice(__input);
16450            Bytes::new(&payload_buf)
16451        } else {
16452            Bytes::new(__input)
16453        };
16454        let mut __struct = Self::default();
16455        __struct.time_usec = buf.get_u64_le();
16456        __struct.roll = buf.get_f32_le();
16457        __struct.pitch = buf.get_f32_le();
16458        __struct.yaw = buf.get_f32_le();
16459        __struct.rollspeed = buf.get_f32_le();
16460        __struct.pitchspeed = buf.get_f32_le();
16461        __struct.yawspeed = buf.get_f32_le();
16462        __struct.lat = buf.get_i32_le();
16463        __struct.lon = buf.get_i32_le();
16464        __struct.alt = buf.get_i32_le();
16465        __struct.vx = buf.get_i16_le();
16466        __struct.vy = buf.get_i16_le();
16467        __struct.vz = buf.get_i16_le();
16468        __struct.xacc = buf.get_i16_le();
16469        __struct.yacc = buf.get_i16_le();
16470        __struct.zacc = buf.get_i16_le();
16471        Ok(__struct)
16472    }
16473    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16474        let mut __tmp = BytesMut::new(bytes);
16475        #[allow(clippy::absurd_extreme_comparisons)]
16476        #[allow(unused_comparisons)]
16477        if __tmp.remaining() < Self::ENCODED_LEN {
16478            panic!(
16479                "buffer is too small (need {} bytes, but got {})",
16480                Self::ENCODED_LEN,
16481                __tmp.remaining(),
16482            )
16483        }
16484        __tmp.put_u64_le(self.time_usec);
16485        __tmp.put_f32_le(self.roll);
16486        __tmp.put_f32_le(self.pitch);
16487        __tmp.put_f32_le(self.yaw);
16488        __tmp.put_f32_le(self.rollspeed);
16489        __tmp.put_f32_le(self.pitchspeed);
16490        __tmp.put_f32_le(self.yawspeed);
16491        __tmp.put_i32_le(self.lat);
16492        __tmp.put_i32_le(self.lon);
16493        __tmp.put_i32_le(self.alt);
16494        __tmp.put_i16_le(self.vx);
16495        __tmp.put_i16_le(self.vy);
16496        __tmp.put_i16_le(self.vz);
16497        __tmp.put_i16_le(self.xacc);
16498        __tmp.put_i16_le(self.yacc);
16499        __tmp.put_i16_le(self.zacc);
16500        if matches!(version, MavlinkVersion::V2) {
16501            let len = __tmp.len();
16502            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16503        } else {
16504            __tmp.len()
16505        }
16506    }
16507}
16508#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16509#[doc = ""]
16510#[doc = "ID: 115"]
16511#[derive(Debug, Clone, PartialEq)]
16512#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16513#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16514#[cfg_attr(feature = "ts", derive(TS))]
16515#[cfg_attr(feature = "ts", ts(export))]
16516pub struct HIL_STATE_QUATERNION_DATA {
16517    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16518    pub time_usec: u64,
16519    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
16520    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16521    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16522    pub attitude_quaternion: [f32; 4],
16523    #[doc = "Body frame roll / phi angular speed"]
16524    pub rollspeed: f32,
16525    #[doc = "Body frame pitch / theta angular speed"]
16526    pub pitchspeed: f32,
16527    #[doc = "Body frame yaw / psi angular speed"]
16528    pub yawspeed: f32,
16529    #[doc = "Latitude"]
16530    pub lat: i32,
16531    #[doc = "Longitude"]
16532    pub lon: i32,
16533    #[doc = "Altitude"]
16534    pub alt: i32,
16535    #[doc = "Ground X Speed (Latitude)"]
16536    pub vx: i16,
16537    #[doc = "Ground Y Speed (Longitude)"]
16538    pub vy: i16,
16539    #[doc = "Ground Z Speed (Altitude)"]
16540    pub vz: i16,
16541    #[doc = "Indicated airspeed"]
16542    pub ind_airspeed: u16,
16543    #[doc = "True airspeed"]
16544    pub true_airspeed: u16,
16545    #[doc = "X acceleration"]
16546    pub xacc: i16,
16547    #[doc = "Y acceleration"]
16548    pub yacc: i16,
16549    #[doc = "Z acceleration"]
16550    pub zacc: i16,
16551}
16552impl HIL_STATE_QUATERNION_DATA {
16553    pub const ENCODED_LEN: usize = 64usize;
16554    pub const DEFAULT: Self = Self {
16555        time_usec: 0_u64,
16556        attitude_quaternion: [0.0_f32; 4usize],
16557        rollspeed: 0.0_f32,
16558        pitchspeed: 0.0_f32,
16559        yawspeed: 0.0_f32,
16560        lat: 0_i32,
16561        lon: 0_i32,
16562        alt: 0_i32,
16563        vx: 0_i16,
16564        vy: 0_i16,
16565        vz: 0_i16,
16566        ind_airspeed: 0_u16,
16567        true_airspeed: 0_u16,
16568        xacc: 0_i16,
16569        yacc: 0_i16,
16570        zacc: 0_i16,
16571    };
16572    #[cfg(feature = "arbitrary")]
16573    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16574        use arbitrary::{Arbitrary, Unstructured};
16575        let mut buf = [0u8; 1024];
16576        rng.fill_bytes(&mut buf);
16577        let mut unstructured = Unstructured::new(&buf);
16578        Self::arbitrary(&mut unstructured).unwrap_or_default()
16579    }
16580}
16581impl Default for HIL_STATE_QUATERNION_DATA {
16582    fn default() -> Self {
16583        Self::DEFAULT.clone()
16584    }
16585}
16586impl MessageData for HIL_STATE_QUATERNION_DATA {
16587    type Message = MavMessage;
16588    const ID: u32 = 115u32;
16589    const NAME: &'static str = "HIL_STATE_QUATERNION";
16590    const EXTRA_CRC: u8 = 4u8;
16591    const ENCODED_LEN: usize = 64usize;
16592    fn deser(
16593        _version: MavlinkVersion,
16594        __input: &[u8],
16595    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16596        let avail_len = __input.len();
16597        let mut payload_buf = [0; Self::ENCODED_LEN];
16598        let mut buf = if avail_len < Self::ENCODED_LEN {
16599            payload_buf[0..avail_len].copy_from_slice(__input);
16600            Bytes::new(&payload_buf)
16601        } else {
16602            Bytes::new(__input)
16603        };
16604        let mut __struct = Self::default();
16605        __struct.time_usec = buf.get_u64_le();
16606        for v in &mut __struct.attitude_quaternion {
16607            let val = buf.get_f32_le();
16608            *v = val;
16609        }
16610        __struct.rollspeed = buf.get_f32_le();
16611        __struct.pitchspeed = buf.get_f32_le();
16612        __struct.yawspeed = buf.get_f32_le();
16613        __struct.lat = buf.get_i32_le();
16614        __struct.lon = buf.get_i32_le();
16615        __struct.alt = buf.get_i32_le();
16616        __struct.vx = buf.get_i16_le();
16617        __struct.vy = buf.get_i16_le();
16618        __struct.vz = buf.get_i16_le();
16619        __struct.ind_airspeed = buf.get_u16_le();
16620        __struct.true_airspeed = buf.get_u16_le();
16621        __struct.xacc = buf.get_i16_le();
16622        __struct.yacc = buf.get_i16_le();
16623        __struct.zacc = buf.get_i16_le();
16624        Ok(__struct)
16625    }
16626    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16627        let mut __tmp = BytesMut::new(bytes);
16628        #[allow(clippy::absurd_extreme_comparisons)]
16629        #[allow(unused_comparisons)]
16630        if __tmp.remaining() < Self::ENCODED_LEN {
16631            panic!(
16632                "buffer is too small (need {} bytes, but got {})",
16633                Self::ENCODED_LEN,
16634                __tmp.remaining(),
16635            )
16636        }
16637        __tmp.put_u64_le(self.time_usec);
16638        for val in &self.attitude_quaternion {
16639            __tmp.put_f32_le(*val);
16640        }
16641        __tmp.put_f32_le(self.rollspeed);
16642        __tmp.put_f32_le(self.pitchspeed);
16643        __tmp.put_f32_le(self.yawspeed);
16644        __tmp.put_i32_le(self.lat);
16645        __tmp.put_i32_le(self.lon);
16646        __tmp.put_i32_le(self.alt);
16647        __tmp.put_i16_le(self.vx);
16648        __tmp.put_i16_le(self.vy);
16649        __tmp.put_i16_le(self.vz);
16650        __tmp.put_u16_le(self.ind_airspeed);
16651        __tmp.put_u16_le(self.true_airspeed);
16652        __tmp.put_i16_le(self.xacc);
16653        __tmp.put_i16_le(self.yacc);
16654        __tmp.put_i16_le(self.zacc);
16655        if matches!(version, MavlinkVersion::V2) {
16656            let len = __tmp.len();
16657            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16658        } else {
16659            __tmp.len()
16660        }
16661    }
16662}
16663#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
16664#[doc = ""]
16665#[doc = "ID: 242"]
16666#[derive(Debug, Clone, PartialEq)]
16667#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16668#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16669#[cfg_attr(feature = "ts", derive(TS))]
16670#[cfg_attr(feature = "ts", ts(export))]
16671pub struct HOME_POSITION_DATA {
16672    #[doc = "Latitude (WGS84)"]
16673    pub latitude: i32,
16674    #[doc = "Longitude (WGS84)"]
16675    pub longitude: i32,
16676    #[doc = "Altitude (MSL). Positive for up."]
16677    pub altitude: i32,
16678    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
16679    pub x: f32,
16680    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
16681    pub y: f32,
16682    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
16683    pub z: f32,
16684    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
16685    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16686    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16687    pub q: [f32; 4],
16688    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16689    pub approach_x: f32,
16690    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16691    pub approach_y: f32,
16692    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16693    pub approach_z: f32,
16694    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16695    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16696    pub time_usec: u64,
16697}
16698impl HOME_POSITION_DATA {
16699    pub const ENCODED_LEN: usize = 60usize;
16700    pub const DEFAULT: Self = Self {
16701        latitude: 0_i32,
16702        longitude: 0_i32,
16703        altitude: 0_i32,
16704        x: 0.0_f32,
16705        y: 0.0_f32,
16706        z: 0.0_f32,
16707        q: [0.0_f32; 4usize],
16708        approach_x: 0.0_f32,
16709        approach_y: 0.0_f32,
16710        approach_z: 0.0_f32,
16711        time_usec: 0_u64,
16712    };
16713    #[cfg(feature = "arbitrary")]
16714    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16715        use arbitrary::{Arbitrary, Unstructured};
16716        let mut buf = [0u8; 1024];
16717        rng.fill_bytes(&mut buf);
16718        let mut unstructured = Unstructured::new(&buf);
16719        Self::arbitrary(&mut unstructured).unwrap_or_default()
16720    }
16721}
16722impl Default for HOME_POSITION_DATA {
16723    fn default() -> Self {
16724        Self::DEFAULT.clone()
16725    }
16726}
16727impl MessageData for HOME_POSITION_DATA {
16728    type Message = MavMessage;
16729    const ID: u32 = 242u32;
16730    const NAME: &'static str = "HOME_POSITION";
16731    const EXTRA_CRC: u8 = 104u8;
16732    const ENCODED_LEN: usize = 60usize;
16733    fn deser(
16734        _version: MavlinkVersion,
16735        __input: &[u8],
16736    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16737        let avail_len = __input.len();
16738        let mut payload_buf = [0; Self::ENCODED_LEN];
16739        let mut buf = if avail_len < Self::ENCODED_LEN {
16740            payload_buf[0..avail_len].copy_from_slice(__input);
16741            Bytes::new(&payload_buf)
16742        } else {
16743            Bytes::new(__input)
16744        };
16745        let mut __struct = Self::default();
16746        __struct.latitude = buf.get_i32_le();
16747        __struct.longitude = buf.get_i32_le();
16748        __struct.altitude = buf.get_i32_le();
16749        __struct.x = buf.get_f32_le();
16750        __struct.y = buf.get_f32_le();
16751        __struct.z = buf.get_f32_le();
16752        for v in &mut __struct.q {
16753            let val = buf.get_f32_le();
16754            *v = val;
16755        }
16756        __struct.approach_x = buf.get_f32_le();
16757        __struct.approach_y = buf.get_f32_le();
16758        __struct.approach_z = buf.get_f32_le();
16759        __struct.time_usec = buf.get_u64_le();
16760        Ok(__struct)
16761    }
16762    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16763        let mut __tmp = BytesMut::new(bytes);
16764        #[allow(clippy::absurd_extreme_comparisons)]
16765        #[allow(unused_comparisons)]
16766        if __tmp.remaining() < Self::ENCODED_LEN {
16767            panic!(
16768                "buffer is too small (need {} bytes, but got {})",
16769                Self::ENCODED_LEN,
16770                __tmp.remaining(),
16771            )
16772        }
16773        __tmp.put_i32_le(self.latitude);
16774        __tmp.put_i32_le(self.longitude);
16775        __tmp.put_i32_le(self.altitude);
16776        __tmp.put_f32_le(self.x);
16777        __tmp.put_f32_le(self.y);
16778        __tmp.put_f32_le(self.z);
16779        for val in &self.q {
16780            __tmp.put_f32_le(*val);
16781        }
16782        __tmp.put_f32_le(self.approach_x);
16783        __tmp.put_f32_le(self.approach_y);
16784        __tmp.put_f32_le(self.approach_z);
16785        if matches!(version, MavlinkVersion::V2) {
16786            __tmp.put_u64_le(self.time_usec);
16787            let len = __tmp.len();
16788            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16789        } else {
16790            __tmp.len()
16791        }
16792    }
16793}
16794#[doc = "Temperature and humidity from hygrometer."]
16795#[doc = ""]
16796#[doc = "ID: 12920"]
16797#[derive(Debug, Clone, PartialEq)]
16798#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16799#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16800#[cfg_attr(feature = "ts", derive(TS))]
16801#[cfg_attr(feature = "ts", ts(export))]
16802pub struct HYGROMETER_SENSOR_DATA {
16803    #[doc = "Temperature"]
16804    pub temperature: i16,
16805    #[doc = "Humidity"]
16806    pub humidity: u16,
16807    #[doc = "Hygrometer ID"]
16808    pub id: u8,
16809}
16810impl HYGROMETER_SENSOR_DATA {
16811    pub const ENCODED_LEN: usize = 5usize;
16812    pub const DEFAULT: Self = Self {
16813        temperature: 0_i16,
16814        humidity: 0_u16,
16815        id: 0_u8,
16816    };
16817    #[cfg(feature = "arbitrary")]
16818    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16819        use arbitrary::{Arbitrary, Unstructured};
16820        let mut buf = [0u8; 1024];
16821        rng.fill_bytes(&mut buf);
16822        let mut unstructured = Unstructured::new(&buf);
16823        Self::arbitrary(&mut unstructured).unwrap_or_default()
16824    }
16825}
16826impl Default for HYGROMETER_SENSOR_DATA {
16827    fn default() -> Self {
16828        Self::DEFAULT.clone()
16829    }
16830}
16831impl MessageData for HYGROMETER_SENSOR_DATA {
16832    type Message = MavMessage;
16833    const ID: u32 = 12920u32;
16834    const NAME: &'static str = "HYGROMETER_SENSOR";
16835    const EXTRA_CRC: u8 = 20u8;
16836    const ENCODED_LEN: usize = 5usize;
16837    fn deser(
16838        _version: MavlinkVersion,
16839        __input: &[u8],
16840    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16841        let avail_len = __input.len();
16842        let mut payload_buf = [0; Self::ENCODED_LEN];
16843        let mut buf = if avail_len < Self::ENCODED_LEN {
16844            payload_buf[0..avail_len].copy_from_slice(__input);
16845            Bytes::new(&payload_buf)
16846        } else {
16847            Bytes::new(__input)
16848        };
16849        let mut __struct = Self::default();
16850        __struct.temperature = buf.get_i16_le();
16851        __struct.humidity = buf.get_u16_le();
16852        __struct.id = buf.get_u8();
16853        Ok(__struct)
16854    }
16855    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16856        let mut __tmp = BytesMut::new(bytes);
16857        #[allow(clippy::absurd_extreme_comparisons)]
16858        #[allow(unused_comparisons)]
16859        if __tmp.remaining() < Self::ENCODED_LEN {
16860            panic!(
16861                "buffer is too small (need {} bytes, but got {})",
16862                Self::ENCODED_LEN,
16863                __tmp.remaining(),
16864            )
16865        }
16866        __tmp.put_i16_le(self.temperature);
16867        __tmp.put_u16_le(self.humidity);
16868        __tmp.put_u8(self.id);
16869        if matches!(version, MavlinkVersion::V2) {
16870            let len = __tmp.len();
16871            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16872        } else {
16873            __tmp.len()
16874        }
16875    }
16876}
16877#[doc = "Illuminator status."]
16878#[doc = ""]
16879#[doc = "ID: 440"]
16880#[derive(Debug, Clone, PartialEq)]
16881#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16882#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16883#[cfg_attr(feature = "ts", derive(TS))]
16884#[cfg_attr(feature = "ts", ts(export))]
16885pub struct ILLUMINATOR_STATUS_DATA {
16886    #[doc = "Time since the start-up of the illuminator in ms"]
16887    pub uptime_ms: u32,
16888    #[doc = "Errors"]
16889    pub error_status: IlluminatorErrorFlags,
16890    #[doc = "Illuminator brightness"]
16891    pub brightness: f32,
16892    #[doc = "Illuminator strobing period in seconds"]
16893    pub strobe_period: f32,
16894    #[doc = "Illuminator strobing duty cycle"]
16895    pub strobe_duty_cycle: f32,
16896    #[doc = "Temperature in Celsius"]
16897    pub temp_c: f32,
16898    #[doc = "Minimum strobing period in seconds"]
16899    pub min_strobe_period: f32,
16900    #[doc = "Maximum strobing period in seconds"]
16901    pub max_strobe_period: f32,
16902    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
16903    pub enable: u8,
16904    #[doc = "Supported illuminator modes"]
16905    pub mode_bitmask: IlluminatorMode,
16906    #[doc = "Illuminator mode"]
16907    pub mode: IlluminatorMode,
16908}
16909impl ILLUMINATOR_STATUS_DATA {
16910    pub const ENCODED_LEN: usize = 35usize;
16911    pub const DEFAULT: Self = Self {
16912        uptime_ms: 0_u32,
16913        error_status: IlluminatorErrorFlags::DEFAULT,
16914        brightness: 0.0_f32,
16915        strobe_period: 0.0_f32,
16916        strobe_duty_cycle: 0.0_f32,
16917        temp_c: 0.0_f32,
16918        min_strobe_period: 0.0_f32,
16919        max_strobe_period: 0.0_f32,
16920        enable: 0_u8,
16921        mode_bitmask: IlluminatorMode::DEFAULT,
16922        mode: IlluminatorMode::DEFAULT,
16923    };
16924    #[cfg(feature = "arbitrary")]
16925    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16926        use arbitrary::{Arbitrary, Unstructured};
16927        let mut buf = [0u8; 1024];
16928        rng.fill_bytes(&mut buf);
16929        let mut unstructured = Unstructured::new(&buf);
16930        Self::arbitrary(&mut unstructured).unwrap_or_default()
16931    }
16932}
16933impl Default for ILLUMINATOR_STATUS_DATA {
16934    fn default() -> Self {
16935        Self::DEFAULT.clone()
16936    }
16937}
16938impl MessageData for ILLUMINATOR_STATUS_DATA {
16939    type Message = MavMessage;
16940    const ID: u32 = 440u32;
16941    const NAME: &'static str = "ILLUMINATOR_STATUS";
16942    const EXTRA_CRC: u8 = 66u8;
16943    const ENCODED_LEN: usize = 35usize;
16944    fn deser(
16945        _version: MavlinkVersion,
16946        __input: &[u8],
16947    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16948        let avail_len = __input.len();
16949        let mut payload_buf = [0; Self::ENCODED_LEN];
16950        let mut buf = if avail_len < Self::ENCODED_LEN {
16951            payload_buf[0..avail_len].copy_from_slice(__input);
16952            Bytes::new(&payload_buf)
16953        } else {
16954            Bytes::new(__input)
16955        };
16956        let mut __struct = Self::default();
16957        __struct.uptime_ms = buf.get_u32_le();
16958        let tmp = buf.get_u32_le();
16959        __struct.error_status = IlluminatorErrorFlags::from_bits(
16960            tmp & IlluminatorErrorFlags::all().bits(),
16961        )
16962        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16963            flag_type: "IlluminatorErrorFlags",
16964            value: tmp as u32,
16965        })?;
16966        __struct.brightness = buf.get_f32_le();
16967        __struct.strobe_period = buf.get_f32_le();
16968        __struct.strobe_duty_cycle = buf.get_f32_le();
16969        __struct.temp_c = buf.get_f32_le();
16970        __struct.min_strobe_period = buf.get_f32_le();
16971        __struct.max_strobe_period = buf.get_f32_le();
16972        __struct.enable = buf.get_u8();
16973        let tmp = buf.get_u8();
16974        __struct.mode_bitmask =
16975            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16976                enum_type: "IlluminatorMode",
16977                value: tmp as u32,
16978            })?;
16979        let tmp = buf.get_u8();
16980        __struct.mode =
16981            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16982                enum_type: "IlluminatorMode",
16983                value: tmp as u32,
16984            })?;
16985        Ok(__struct)
16986    }
16987    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16988        let mut __tmp = BytesMut::new(bytes);
16989        #[allow(clippy::absurd_extreme_comparisons)]
16990        #[allow(unused_comparisons)]
16991        if __tmp.remaining() < Self::ENCODED_LEN {
16992            panic!(
16993                "buffer is too small (need {} bytes, but got {})",
16994                Self::ENCODED_LEN,
16995                __tmp.remaining(),
16996            )
16997        }
16998        __tmp.put_u32_le(self.uptime_ms);
16999        __tmp.put_u32_le(self.error_status.bits());
17000        __tmp.put_f32_le(self.brightness);
17001        __tmp.put_f32_le(self.strobe_period);
17002        __tmp.put_f32_le(self.strobe_duty_cycle);
17003        __tmp.put_f32_le(self.temp_c);
17004        __tmp.put_f32_le(self.min_strobe_period);
17005        __tmp.put_f32_le(self.max_strobe_period);
17006        __tmp.put_u8(self.enable);
17007        __tmp.put_u8(self.mode_bitmask as u8);
17008        __tmp.put_u8(self.mode as u8);
17009        if matches!(version, MavlinkVersion::V2) {
17010            let len = __tmp.len();
17011            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17012        } else {
17013            __tmp.len()
17014        }
17015    }
17016}
17017#[doc = "Status of the Iridium SBD link."]
17018#[doc = ""]
17019#[doc = "ID: 335"]
17020#[derive(Debug, Clone, PartialEq)]
17021#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17022#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17023#[cfg_attr(feature = "ts", derive(TS))]
17024#[cfg_attr(feature = "ts", ts(export))]
17025pub struct ISBD_LINK_STATUS_DATA {
17026    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17027    pub timestamp: u64,
17028    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17029    pub last_heartbeat: u64,
17030    #[doc = "Number of failed SBD sessions."]
17031    pub failed_sessions: u16,
17032    #[doc = "Number of successful SBD sessions."]
17033    pub successful_sessions: u16,
17034    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
17035    pub signal_quality: u8,
17036    #[doc = "1: Ring call pending, 0: No call pending."]
17037    pub ring_pending: u8,
17038    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
17039    pub tx_session_pending: u8,
17040    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
17041    pub rx_session_pending: u8,
17042}
17043impl ISBD_LINK_STATUS_DATA {
17044    pub const ENCODED_LEN: usize = 24usize;
17045    pub const DEFAULT: Self = Self {
17046        timestamp: 0_u64,
17047        last_heartbeat: 0_u64,
17048        failed_sessions: 0_u16,
17049        successful_sessions: 0_u16,
17050        signal_quality: 0_u8,
17051        ring_pending: 0_u8,
17052        tx_session_pending: 0_u8,
17053        rx_session_pending: 0_u8,
17054    };
17055    #[cfg(feature = "arbitrary")]
17056    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17057        use arbitrary::{Arbitrary, Unstructured};
17058        let mut buf = [0u8; 1024];
17059        rng.fill_bytes(&mut buf);
17060        let mut unstructured = Unstructured::new(&buf);
17061        Self::arbitrary(&mut unstructured).unwrap_or_default()
17062    }
17063}
17064impl Default for ISBD_LINK_STATUS_DATA {
17065    fn default() -> Self {
17066        Self::DEFAULT.clone()
17067    }
17068}
17069impl MessageData for ISBD_LINK_STATUS_DATA {
17070    type Message = MavMessage;
17071    const ID: u32 = 335u32;
17072    const NAME: &'static str = "ISBD_LINK_STATUS";
17073    const EXTRA_CRC: u8 = 225u8;
17074    const ENCODED_LEN: usize = 24usize;
17075    fn deser(
17076        _version: MavlinkVersion,
17077        __input: &[u8],
17078    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17079        let avail_len = __input.len();
17080        let mut payload_buf = [0; Self::ENCODED_LEN];
17081        let mut buf = if avail_len < Self::ENCODED_LEN {
17082            payload_buf[0..avail_len].copy_from_slice(__input);
17083            Bytes::new(&payload_buf)
17084        } else {
17085            Bytes::new(__input)
17086        };
17087        let mut __struct = Self::default();
17088        __struct.timestamp = buf.get_u64_le();
17089        __struct.last_heartbeat = buf.get_u64_le();
17090        __struct.failed_sessions = buf.get_u16_le();
17091        __struct.successful_sessions = buf.get_u16_le();
17092        __struct.signal_quality = buf.get_u8();
17093        __struct.ring_pending = buf.get_u8();
17094        __struct.tx_session_pending = buf.get_u8();
17095        __struct.rx_session_pending = buf.get_u8();
17096        Ok(__struct)
17097    }
17098    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17099        let mut __tmp = BytesMut::new(bytes);
17100        #[allow(clippy::absurd_extreme_comparisons)]
17101        #[allow(unused_comparisons)]
17102        if __tmp.remaining() < Self::ENCODED_LEN {
17103            panic!(
17104                "buffer is too small (need {} bytes, but got {})",
17105                Self::ENCODED_LEN,
17106                __tmp.remaining(),
17107            )
17108        }
17109        __tmp.put_u64_le(self.timestamp);
17110        __tmp.put_u64_le(self.last_heartbeat);
17111        __tmp.put_u16_le(self.failed_sessions);
17112        __tmp.put_u16_le(self.successful_sessions);
17113        __tmp.put_u8(self.signal_quality);
17114        __tmp.put_u8(self.ring_pending);
17115        __tmp.put_u8(self.tx_session_pending);
17116        __tmp.put_u8(self.rx_session_pending);
17117        if matches!(version, MavlinkVersion::V2) {
17118            let len = __tmp.len();
17119            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17120        } else {
17121            __tmp.len()
17122        }
17123    }
17124}
17125#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
17126#[doc = ""]
17127#[doc = "ID: 149"]
17128#[derive(Debug, Clone, PartialEq)]
17129#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17131#[cfg_attr(feature = "ts", derive(TS))]
17132#[cfg_attr(feature = "ts", ts(export))]
17133pub struct LANDING_TARGET_DATA {
17134    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17135    pub time_usec: u64,
17136    #[doc = "X-axis angular offset of the target from the center of the image"]
17137    pub angle_x: f32,
17138    #[doc = "Y-axis angular offset of the target from the center of the image"]
17139    pub angle_y: f32,
17140    #[doc = "Distance to the target from the vehicle"]
17141    pub distance: f32,
17142    #[doc = "Size of target along x-axis"]
17143    pub size_x: f32,
17144    #[doc = "Size of target along y-axis"]
17145    pub size_y: f32,
17146    #[doc = "The ID of the target if multiple targets are present"]
17147    pub target_num: u8,
17148    #[doc = "Coordinate frame used for following fields."]
17149    pub frame: MavFrame,
17150    #[doc = "X Position of the landing target in MAV_FRAME"]
17151    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17152    pub x: f32,
17153    #[doc = "Y Position of the landing target in MAV_FRAME"]
17154    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17155    pub y: f32,
17156    #[doc = "Z Position of the landing target in MAV_FRAME"]
17157    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17158    pub z: f32,
17159    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
17160    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17161    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17162    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17163    pub q: [f32; 4],
17164    #[doc = "Type of landing target"]
17165    #[cfg_attr(feature = "serde", serde(default))]
17166    pub mavtype: LandingTargetType,
17167    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
17168    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17169    pub position_valid: u8,
17170}
17171impl LANDING_TARGET_DATA {
17172    pub const ENCODED_LEN: usize = 60usize;
17173    pub const DEFAULT: Self = Self {
17174        time_usec: 0_u64,
17175        angle_x: 0.0_f32,
17176        angle_y: 0.0_f32,
17177        distance: 0.0_f32,
17178        size_x: 0.0_f32,
17179        size_y: 0.0_f32,
17180        target_num: 0_u8,
17181        frame: MavFrame::DEFAULT,
17182        x: 0.0_f32,
17183        y: 0.0_f32,
17184        z: 0.0_f32,
17185        q: [0.0_f32; 4usize],
17186        mavtype: LandingTargetType::DEFAULT,
17187        position_valid: 0_u8,
17188    };
17189    #[cfg(feature = "arbitrary")]
17190    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17191        use arbitrary::{Arbitrary, Unstructured};
17192        let mut buf = [0u8; 1024];
17193        rng.fill_bytes(&mut buf);
17194        let mut unstructured = Unstructured::new(&buf);
17195        Self::arbitrary(&mut unstructured).unwrap_or_default()
17196    }
17197}
17198impl Default for LANDING_TARGET_DATA {
17199    fn default() -> Self {
17200        Self::DEFAULT.clone()
17201    }
17202}
17203impl MessageData for LANDING_TARGET_DATA {
17204    type Message = MavMessage;
17205    const ID: u32 = 149u32;
17206    const NAME: &'static str = "LANDING_TARGET";
17207    const EXTRA_CRC: u8 = 200u8;
17208    const ENCODED_LEN: usize = 60usize;
17209    fn deser(
17210        _version: MavlinkVersion,
17211        __input: &[u8],
17212    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17213        let avail_len = __input.len();
17214        let mut payload_buf = [0; Self::ENCODED_LEN];
17215        let mut buf = if avail_len < Self::ENCODED_LEN {
17216            payload_buf[0..avail_len].copy_from_slice(__input);
17217            Bytes::new(&payload_buf)
17218        } else {
17219            Bytes::new(__input)
17220        };
17221        let mut __struct = Self::default();
17222        __struct.time_usec = buf.get_u64_le();
17223        __struct.angle_x = buf.get_f32_le();
17224        __struct.angle_y = buf.get_f32_le();
17225        __struct.distance = buf.get_f32_le();
17226        __struct.size_x = buf.get_f32_le();
17227        __struct.size_y = buf.get_f32_le();
17228        __struct.target_num = buf.get_u8();
17229        let tmp = buf.get_u8();
17230        __struct.frame =
17231            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17232                enum_type: "MavFrame",
17233                value: tmp as u32,
17234            })?;
17235        __struct.x = buf.get_f32_le();
17236        __struct.y = buf.get_f32_le();
17237        __struct.z = buf.get_f32_le();
17238        for v in &mut __struct.q {
17239            let val = buf.get_f32_le();
17240            *v = val;
17241        }
17242        let tmp = buf.get_u8();
17243        __struct.mavtype =
17244            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17245                enum_type: "LandingTargetType",
17246                value: tmp as u32,
17247            })?;
17248        __struct.position_valid = buf.get_u8();
17249        Ok(__struct)
17250    }
17251    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17252        let mut __tmp = BytesMut::new(bytes);
17253        #[allow(clippy::absurd_extreme_comparisons)]
17254        #[allow(unused_comparisons)]
17255        if __tmp.remaining() < Self::ENCODED_LEN {
17256            panic!(
17257                "buffer is too small (need {} bytes, but got {})",
17258                Self::ENCODED_LEN,
17259                __tmp.remaining(),
17260            )
17261        }
17262        __tmp.put_u64_le(self.time_usec);
17263        __tmp.put_f32_le(self.angle_x);
17264        __tmp.put_f32_le(self.angle_y);
17265        __tmp.put_f32_le(self.distance);
17266        __tmp.put_f32_le(self.size_x);
17267        __tmp.put_f32_le(self.size_y);
17268        __tmp.put_u8(self.target_num);
17269        __tmp.put_u8(self.frame as u8);
17270        if matches!(version, MavlinkVersion::V2) {
17271            __tmp.put_f32_le(self.x);
17272            __tmp.put_f32_le(self.y);
17273            __tmp.put_f32_le(self.z);
17274            for val in &self.q {
17275                __tmp.put_f32_le(*val);
17276            }
17277            __tmp.put_u8(self.mavtype as u8);
17278            __tmp.put_u8(self.position_valid);
17279            let len = __tmp.len();
17280            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17281        } else {
17282            __tmp.len()
17283        }
17284    }
17285}
17286#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
17287#[doc = ""]
17288#[doc = "ID: 8"]
17289#[derive(Debug, Clone, PartialEq)]
17290#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17292#[cfg_attr(feature = "ts", derive(TS))]
17293#[cfg_attr(feature = "ts", ts(export))]
17294pub struct LINK_NODE_STATUS_DATA {
17295    #[doc = "Timestamp (time since system boot)."]
17296    pub timestamp: u64,
17297    #[doc = "Transmit rate"]
17298    pub tx_rate: u32,
17299    #[doc = "Receive rate"]
17300    pub rx_rate: u32,
17301    #[doc = "Messages sent"]
17302    pub messages_sent: u32,
17303    #[doc = "Messages received (estimated from counting seq)"]
17304    pub messages_received: u32,
17305    #[doc = "Messages lost (estimated from counting seq)"]
17306    pub messages_lost: u32,
17307    #[doc = "Number of bytes that could not be parsed correctly."]
17308    pub rx_parse_err: u16,
17309    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17310    pub tx_overflows: u16,
17311    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17312    pub rx_overflows: u16,
17313    #[doc = "Remaining free transmit buffer space"]
17314    pub tx_buf: u8,
17315    #[doc = "Remaining free receive buffer space"]
17316    pub rx_buf: u8,
17317}
17318impl LINK_NODE_STATUS_DATA {
17319    pub const ENCODED_LEN: usize = 36usize;
17320    pub const DEFAULT: Self = Self {
17321        timestamp: 0_u64,
17322        tx_rate: 0_u32,
17323        rx_rate: 0_u32,
17324        messages_sent: 0_u32,
17325        messages_received: 0_u32,
17326        messages_lost: 0_u32,
17327        rx_parse_err: 0_u16,
17328        tx_overflows: 0_u16,
17329        rx_overflows: 0_u16,
17330        tx_buf: 0_u8,
17331        rx_buf: 0_u8,
17332    };
17333    #[cfg(feature = "arbitrary")]
17334    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17335        use arbitrary::{Arbitrary, Unstructured};
17336        let mut buf = [0u8; 1024];
17337        rng.fill_bytes(&mut buf);
17338        let mut unstructured = Unstructured::new(&buf);
17339        Self::arbitrary(&mut unstructured).unwrap_or_default()
17340    }
17341}
17342impl Default for LINK_NODE_STATUS_DATA {
17343    fn default() -> Self {
17344        Self::DEFAULT.clone()
17345    }
17346}
17347impl MessageData for LINK_NODE_STATUS_DATA {
17348    type Message = MavMessage;
17349    const ID: u32 = 8u32;
17350    const NAME: &'static str = "LINK_NODE_STATUS";
17351    const EXTRA_CRC: u8 = 117u8;
17352    const ENCODED_LEN: usize = 36usize;
17353    fn deser(
17354        _version: MavlinkVersion,
17355        __input: &[u8],
17356    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17357        let avail_len = __input.len();
17358        let mut payload_buf = [0; Self::ENCODED_LEN];
17359        let mut buf = if avail_len < Self::ENCODED_LEN {
17360            payload_buf[0..avail_len].copy_from_slice(__input);
17361            Bytes::new(&payload_buf)
17362        } else {
17363            Bytes::new(__input)
17364        };
17365        let mut __struct = Self::default();
17366        __struct.timestamp = buf.get_u64_le();
17367        __struct.tx_rate = buf.get_u32_le();
17368        __struct.rx_rate = buf.get_u32_le();
17369        __struct.messages_sent = buf.get_u32_le();
17370        __struct.messages_received = buf.get_u32_le();
17371        __struct.messages_lost = buf.get_u32_le();
17372        __struct.rx_parse_err = buf.get_u16_le();
17373        __struct.tx_overflows = buf.get_u16_le();
17374        __struct.rx_overflows = buf.get_u16_le();
17375        __struct.tx_buf = buf.get_u8();
17376        __struct.rx_buf = buf.get_u8();
17377        Ok(__struct)
17378    }
17379    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17380        let mut __tmp = BytesMut::new(bytes);
17381        #[allow(clippy::absurd_extreme_comparisons)]
17382        #[allow(unused_comparisons)]
17383        if __tmp.remaining() < Self::ENCODED_LEN {
17384            panic!(
17385                "buffer is too small (need {} bytes, but got {})",
17386                Self::ENCODED_LEN,
17387                __tmp.remaining(),
17388            )
17389        }
17390        __tmp.put_u64_le(self.timestamp);
17391        __tmp.put_u32_le(self.tx_rate);
17392        __tmp.put_u32_le(self.rx_rate);
17393        __tmp.put_u32_le(self.messages_sent);
17394        __tmp.put_u32_le(self.messages_received);
17395        __tmp.put_u32_le(self.messages_lost);
17396        __tmp.put_u16_le(self.rx_parse_err);
17397        __tmp.put_u16_le(self.tx_overflows);
17398        __tmp.put_u16_le(self.rx_overflows);
17399        __tmp.put_u8(self.tx_buf);
17400        __tmp.put_u8(self.rx_buf);
17401        if matches!(version, MavlinkVersion::V2) {
17402            let len = __tmp.len();
17403            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17404        } else {
17405            __tmp.len()
17406        }
17407    }
17408}
17409#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17410#[doc = ""]
17411#[doc = "ID: 32"]
17412#[derive(Debug, Clone, PartialEq)]
17413#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17414#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17415#[cfg_attr(feature = "ts", derive(TS))]
17416#[cfg_attr(feature = "ts", ts(export))]
17417pub struct LOCAL_POSITION_NED_DATA {
17418    #[doc = "Timestamp (time since system boot)."]
17419    pub time_boot_ms: u32,
17420    #[doc = "X Position"]
17421    pub x: f32,
17422    #[doc = "Y Position"]
17423    pub y: f32,
17424    #[doc = "Z Position"]
17425    pub z: f32,
17426    #[doc = "X Speed"]
17427    pub vx: f32,
17428    #[doc = "Y Speed"]
17429    pub vy: f32,
17430    #[doc = "Z Speed"]
17431    pub vz: f32,
17432}
17433impl LOCAL_POSITION_NED_DATA {
17434    pub const ENCODED_LEN: usize = 28usize;
17435    pub const DEFAULT: Self = Self {
17436        time_boot_ms: 0_u32,
17437        x: 0.0_f32,
17438        y: 0.0_f32,
17439        z: 0.0_f32,
17440        vx: 0.0_f32,
17441        vy: 0.0_f32,
17442        vz: 0.0_f32,
17443    };
17444    #[cfg(feature = "arbitrary")]
17445    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17446        use arbitrary::{Arbitrary, Unstructured};
17447        let mut buf = [0u8; 1024];
17448        rng.fill_bytes(&mut buf);
17449        let mut unstructured = Unstructured::new(&buf);
17450        Self::arbitrary(&mut unstructured).unwrap_or_default()
17451    }
17452}
17453impl Default for LOCAL_POSITION_NED_DATA {
17454    fn default() -> Self {
17455        Self::DEFAULT.clone()
17456    }
17457}
17458impl MessageData for LOCAL_POSITION_NED_DATA {
17459    type Message = MavMessage;
17460    const ID: u32 = 32u32;
17461    const NAME: &'static str = "LOCAL_POSITION_NED";
17462    const EXTRA_CRC: u8 = 185u8;
17463    const ENCODED_LEN: usize = 28usize;
17464    fn deser(
17465        _version: MavlinkVersion,
17466        __input: &[u8],
17467    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17468        let avail_len = __input.len();
17469        let mut payload_buf = [0; Self::ENCODED_LEN];
17470        let mut buf = if avail_len < Self::ENCODED_LEN {
17471            payload_buf[0..avail_len].copy_from_slice(__input);
17472            Bytes::new(&payload_buf)
17473        } else {
17474            Bytes::new(__input)
17475        };
17476        let mut __struct = Self::default();
17477        __struct.time_boot_ms = buf.get_u32_le();
17478        __struct.x = buf.get_f32_le();
17479        __struct.y = buf.get_f32_le();
17480        __struct.z = buf.get_f32_le();
17481        __struct.vx = buf.get_f32_le();
17482        __struct.vy = buf.get_f32_le();
17483        __struct.vz = buf.get_f32_le();
17484        Ok(__struct)
17485    }
17486    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17487        let mut __tmp = BytesMut::new(bytes);
17488        #[allow(clippy::absurd_extreme_comparisons)]
17489        #[allow(unused_comparisons)]
17490        if __tmp.remaining() < Self::ENCODED_LEN {
17491            panic!(
17492                "buffer is too small (need {} bytes, but got {})",
17493                Self::ENCODED_LEN,
17494                __tmp.remaining(),
17495            )
17496        }
17497        __tmp.put_u32_le(self.time_boot_ms);
17498        __tmp.put_f32_le(self.x);
17499        __tmp.put_f32_le(self.y);
17500        __tmp.put_f32_le(self.z);
17501        __tmp.put_f32_le(self.vx);
17502        __tmp.put_f32_le(self.vy);
17503        __tmp.put_f32_le(self.vz);
17504        if matches!(version, MavlinkVersion::V2) {
17505            let len = __tmp.len();
17506            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17507        } else {
17508            __tmp.len()
17509        }
17510    }
17511}
17512#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17513#[doc = ""]
17514#[doc = "ID: 64"]
17515#[derive(Debug, Clone, PartialEq)]
17516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17517#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17518#[cfg_attr(feature = "ts", derive(TS))]
17519#[cfg_attr(feature = "ts", ts(export))]
17520pub struct LOCAL_POSITION_NED_COV_DATA {
17521    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17522    pub time_usec: u64,
17523    #[doc = "X Position"]
17524    pub x: f32,
17525    #[doc = "Y Position"]
17526    pub y: f32,
17527    #[doc = "Z Position"]
17528    pub z: f32,
17529    #[doc = "X Speed"]
17530    pub vx: f32,
17531    #[doc = "Y Speed"]
17532    pub vy: f32,
17533    #[doc = "Z Speed"]
17534    pub vz: f32,
17535    #[doc = "X Acceleration"]
17536    pub ax: f32,
17537    #[doc = "Y Acceleration"]
17538    pub ay: f32,
17539    #[doc = "Z Acceleration"]
17540    pub az: f32,
17541    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
17542    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17543    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17544    pub covariance: [f32; 45],
17545    #[doc = "Class id of the estimator this estimate originated from."]
17546    pub estimator_type: MavEstimatorType,
17547}
17548impl LOCAL_POSITION_NED_COV_DATA {
17549    pub const ENCODED_LEN: usize = 225usize;
17550    pub const DEFAULT: Self = Self {
17551        time_usec: 0_u64,
17552        x: 0.0_f32,
17553        y: 0.0_f32,
17554        z: 0.0_f32,
17555        vx: 0.0_f32,
17556        vy: 0.0_f32,
17557        vz: 0.0_f32,
17558        ax: 0.0_f32,
17559        ay: 0.0_f32,
17560        az: 0.0_f32,
17561        covariance: [0.0_f32; 45usize],
17562        estimator_type: MavEstimatorType::DEFAULT,
17563    };
17564    #[cfg(feature = "arbitrary")]
17565    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17566        use arbitrary::{Arbitrary, Unstructured};
17567        let mut buf = [0u8; 1024];
17568        rng.fill_bytes(&mut buf);
17569        let mut unstructured = Unstructured::new(&buf);
17570        Self::arbitrary(&mut unstructured).unwrap_or_default()
17571    }
17572}
17573impl Default for LOCAL_POSITION_NED_COV_DATA {
17574    fn default() -> Self {
17575        Self::DEFAULT.clone()
17576    }
17577}
17578impl MessageData for LOCAL_POSITION_NED_COV_DATA {
17579    type Message = MavMessage;
17580    const ID: u32 = 64u32;
17581    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
17582    const EXTRA_CRC: u8 = 191u8;
17583    const ENCODED_LEN: usize = 225usize;
17584    fn deser(
17585        _version: MavlinkVersion,
17586        __input: &[u8],
17587    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17588        let avail_len = __input.len();
17589        let mut payload_buf = [0; Self::ENCODED_LEN];
17590        let mut buf = if avail_len < Self::ENCODED_LEN {
17591            payload_buf[0..avail_len].copy_from_slice(__input);
17592            Bytes::new(&payload_buf)
17593        } else {
17594            Bytes::new(__input)
17595        };
17596        let mut __struct = Self::default();
17597        __struct.time_usec = buf.get_u64_le();
17598        __struct.x = buf.get_f32_le();
17599        __struct.y = buf.get_f32_le();
17600        __struct.z = buf.get_f32_le();
17601        __struct.vx = buf.get_f32_le();
17602        __struct.vy = buf.get_f32_le();
17603        __struct.vz = buf.get_f32_le();
17604        __struct.ax = buf.get_f32_le();
17605        __struct.ay = buf.get_f32_le();
17606        __struct.az = buf.get_f32_le();
17607        for v in &mut __struct.covariance {
17608            let val = buf.get_f32_le();
17609            *v = val;
17610        }
17611        let tmp = buf.get_u8();
17612        __struct.estimator_type =
17613            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17614                enum_type: "MavEstimatorType",
17615                value: tmp as u32,
17616            })?;
17617        Ok(__struct)
17618    }
17619    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17620        let mut __tmp = BytesMut::new(bytes);
17621        #[allow(clippy::absurd_extreme_comparisons)]
17622        #[allow(unused_comparisons)]
17623        if __tmp.remaining() < Self::ENCODED_LEN {
17624            panic!(
17625                "buffer is too small (need {} bytes, but got {})",
17626                Self::ENCODED_LEN,
17627                __tmp.remaining(),
17628            )
17629        }
17630        __tmp.put_u64_le(self.time_usec);
17631        __tmp.put_f32_le(self.x);
17632        __tmp.put_f32_le(self.y);
17633        __tmp.put_f32_le(self.z);
17634        __tmp.put_f32_le(self.vx);
17635        __tmp.put_f32_le(self.vy);
17636        __tmp.put_f32_le(self.vz);
17637        __tmp.put_f32_le(self.ax);
17638        __tmp.put_f32_le(self.ay);
17639        __tmp.put_f32_le(self.az);
17640        for val in &self.covariance {
17641            __tmp.put_f32_le(*val);
17642        }
17643        __tmp.put_u8(self.estimator_type as u8);
17644        if matches!(version, MavlinkVersion::V2) {
17645            let len = __tmp.len();
17646            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17647        } else {
17648            __tmp.len()
17649        }
17650    }
17651}
17652#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17653#[doc = ""]
17654#[doc = "ID: 89"]
17655#[derive(Debug, Clone, PartialEq)]
17656#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17657#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17658#[cfg_attr(feature = "ts", derive(TS))]
17659#[cfg_attr(feature = "ts", ts(export))]
17660pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17661    #[doc = "Timestamp (time since system boot)."]
17662    pub time_boot_ms: u32,
17663    #[doc = "X Position"]
17664    pub x: f32,
17665    #[doc = "Y Position"]
17666    pub y: f32,
17667    #[doc = "Z Position"]
17668    pub z: f32,
17669    #[doc = "Roll"]
17670    pub roll: f32,
17671    #[doc = "Pitch"]
17672    pub pitch: f32,
17673    #[doc = "Yaw"]
17674    pub yaw: f32,
17675}
17676impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17677    pub const ENCODED_LEN: usize = 28usize;
17678    pub const DEFAULT: Self = Self {
17679        time_boot_ms: 0_u32,
17680        x: 0.0_f32,
17681        y: 0.0_f32,
17682        z: 0.0_f32,
17683        roll: 0.0_f32,
17684        pitch: 0.0_f32,
17685        yaw: 0.0_f32,
17686    };
17687    #[cfg(feature = "arbitrary")]
17688    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17689        use arbitrary::{Arbitrary, Unstructured};
17690        let mut buf = [0u8; 1024];
17691        rng.fill_bytes(&mut buf);
17692        let mut unstructured = Unstructured::new(&buf);
17693        Self::arbitrary(&mut unstructured).unwrap_or_default()
17694    }
17695}
17696impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17697    fn default() -> Self {
17698        Self::DEFAULT.clone()
17699    }
17700}
17701impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17702    type Message = MavMessage;
17703    const ID: u32 = 89u32;
17704    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
17705    const EXTRA_CRC: u8 = 231u8;
17706    const ENCODED_LEN: usize = 28usize;
17707    fn deser(
17708        _version: MavlinkVersion,
17709        __input: &[u8],
17710    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17711        let avail_len = __input.len();
17712        let mut payload_buf = [0; Self::ENCODED_LEN];
17713        let mut buf = if avail_len < Self::ENCODED_LEN {
17714            payload_buf[0..avail_len].copy_from_slice(__input);
17715            Bytes::new(&payload_buf)
17716        } else {
17717            Bytes::new(__input)
17718        };
17719        let mut __struct = Self::default();
17720        __struct.time_boot_ms = buf.get_u32_le();
17721        __struct.x = buf.get_f32_le();
17722        __struct.y = buf.get_f32_le();
17723        __struct.z = buf.get_f32_le();
17724        __struct.roll = buf.get_f32_le();
17725        __struct.pitch = buf.get_f32_le();
17726        __struct.yaw = buf.get_f32_le();
17727        Ok(__struct)
17728    }
17729    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17730        let mut __tmp = BytesMut::new(bytes);
17731        #[allow(clippy::absurd_extreme_comparisons)]
17732        #[allow(unused_comparisons)]
17733        if __tmp.remaining() < Self::ENCODED_LEN {
17734            panic!(
17735                "buffer is too small (need {} bytes, but got {})",
17736                Self::ENCODED_LEN,
17737                __tmp.remaining(),
17738            )
17739        }
17740        __tmp.put_u32_le(self.time_boot_ms);
17741        __tmp.put_f32_le(self.x);
17742        __tmp.put_f32_le(self.y);
17743        __tmp.put_f32_le(self.z);
17744        __tmp.put_f32_le(self.roll);
17745        __tmp.put_f32_le(self.pitch);
17746        __tmp.put_f32_le(self.yaw);
17747        if matches!(version, MavlinkVersion::V2) {
17748            let len = __tmp.len();
17749            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17750        } else {
17751            __tmp.len()
17752        }
17753    }
17754}
17755#[doc = "An ack for a LOGGING_DATA_ACKED message."]
17756#[doc = ""]
17757#[doc = "ID: 268"]
17758#[derive(Debug, Clone, PartialEq)]
17759#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17760#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17761#[cfg_attr(feature = "ts", derive(TS))]
17762#[cfg_attr(feature = "ts", ts(export))]
17763pub struct LOGGING_ACK_DATA {
17764    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
17765    pub sequence: u16,
17766    #[doc = "system ID of the target"]
17767    pub target_system: u8,
17768    #[doc = "component ID of the target"]
17769    pub target_component: u8,
17770}
17771impl LOGGING_ACK_DATA {
17772    pub const ENCODED_LEN: usize = 4usize;
17773    pub const DEFAULT: Self = Self {
17774        sequence: 0_u16,
17775        target_system: 0_u8,
17776        target_component: 0_u8,
17777    };
17778    #[cfg(feature = "arbitrary")]
17779    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17780        use arbitrary::{Arbitrary, Unstructured};
17781        let mut buf = [0u8; 1024];
17782        rng.fill_bytes(&mut buf);
17783        let mut unstructured = Unstructured::new(&buf);
17784        Self::arbitrary(&mut unstructured).unwrap_or_default()
17785    }
17786}
17787impl Default for LOGGING_ACK_DATA {
17788    fn default() -> Self {
17789        Self::DEFAULT.clone()
17790    }
17791}
17792impl MessageData for LOGGING_ACK_DATA {
17793    type Message = MavMessage;
17794    const ID: u32 = 268u32;
17795    const NAME: &'static str = "LOGGING_ACK";
17796    const EXTRA_CRC: u8 = 14u8;
17797    const ENCODED_LEN: usize = 4usize;
17798    fn deser(
17799        _version: MavlinkVersion,
17800        __input: &[u8],
17801    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17802        let avail_len = __input.len();
17803        let mut payload_buf = [0; Self::ENCODED_LEN];
17804        let mut buf = if avail_len < Self::ENCODED_LEN {
17805            payload_buf[0..avail_len].copy_from_slice(__input);
17806            Bytes::new(&payload_buf)
17807        } else {
17808            Bytes::new(__input)
17809        };
17810        let mut __struct = Self::default();
17811        __struct.sequence = buf.get_u16_le();
17812        __struct.target_system = buf.get_u8();
17813        __struct.target_component = buf.get_u8();
17814        Ok(__struct)
17815    }
17816    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17817        let mut __tmp = BytesMut::new(bytes);
17818        #[allow(clippy::absurd_extreme_comparisons)]
17819        #[allow(unused_comparisons)]
17820        if __tmp.remaining() < Self::ENCODED_LEN {
17821            panic!(
17822                "buffer is too small (need {} bytes, but got {})",
17823                Self::ENCODED_LEN,
17824                __tmp.remaining(),
17825            )
17826        }
17827        __tmp.put_u16_le(self.sequence);
17828        __tmp.put_u8(self.target_system);
17829        __tmp.put_u8(self.target_component);
17830        if matches!(version, MavlinkVersion::V2) {
17831            let len = __tmp.len();
17832            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17833        } else {
17834            __tmp.len()
17835        }
17836    }
17837}
17838#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
17839#[doc = ""]
17840#[doc = "ID: 266"]
17841#[derive(Debug, Clone, PartialEq)]
17842#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17843#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17844#[cfg_attr(feature = "ts", derive(TS))]
17845#[cfg_attr(feature = "ts", ts(export))]
17846pub struct LOGGING_DATA_DATA {
17847    #[doc = "sequence number (can wrap)"]
17848    pub sequence: u16,
17849    #[doc = "system ID of the target"]
17850    pub target_system: u8,
17851    #[doc = "component ID of the target"]
17852    pub target_component: u8,
17853    #[doc = "data length"]
17854    pub length: u8,
17855    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
17856    pub first_message_offset: u8,
17857    #[doc = "logged data"]
17858    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17859    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17860    pub data: [u8; 249],
17861}
17862impl LOGGING_DATA_DATA {
17863    pub const ENCODED_LEN: usize = 255usize;
17864    pub const DEFAULT: Self = Self {
17865        sequence: 0_u16,
17866        target_system: 0_u8,
17867        target_component: 0_u8,
17868        length: 0_u8,
17869        first_message_offset: 0_u8,
17870        data: [0_u8; 249usize],
17871    };
17872    #[cfg(feature = "arbitrary")]
17873    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17874        use arbitrary::{Arbitrary, Unstructured};
17875        let mut buf = [0u8; 1024];
17876        rng.fill_bytes(&mut buf);
17877        let mut unstructured = Unstructured::new(&buf);
17878        Self::arbitrary(&mut unstructured).unwrap_or_default()
17879    }
17880}
17881impl Default for LOGGING_DATA_DATA {
17882    fn default() -> Self {
17883        Self::DEFAULT.clone()
17884    }
17885}
17886impl MessageData for LOGGING_DATA_DATA {
17887    type Message = MavMessage;
17888    const ID: u32 = 266u32;
17889    const NAME: &'static str = "LOGGING_DATA";
17890    const EXTRA_CRC: u8 = 193u8;
17891    const ENCODED_LEN: usize = 255usize;
17892    fn deser(
17893        _version: MavlinkVersion,
17894        __input: &[u8],
17895    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17896        let avail_len = __input.len();
17897        let mut payload_buf = [0; Self::ENCODED_LEN];
17898        let mut buf = if avail_len < Self::ENCODED_LEN {
17899            payload_buf[0..avail_len].copy_from_slice(__input);
17900            Bytes::new(&payload_buf)
17901        } else {
17902            Bytes::new(__input)
17903        };
17904        let mut __struct = Self::default();
17905        __struct.sequence = buf.get_u16_le();
17906        __struct.target_system = buf.get_u8();
17907        __struct.target_component = buf.get_u8();
17908        __struct.length = buf.get_u8();
17909        __struct.first_message_offset = buf.get_u8();
17910        for v in &mut __struct.data {
17911            let val = buf.get_u8();
17912            *v = val;
17913        }
17914        Ok(__struct)
17915    }
17916    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17917        let mut __tmp = BytesMut::new(bytes);
17918        #[allow(clippy::absurd_extreme_comparisons)]
17919        #[allow(unused_comparisons)]
17920        if __tmp.remaining() < Self::ENCODED_LEN {
17921            panic!(
17922                "buffer is too small (need {} bytes, but got {})",
17923                Self::ENCODED_LEN,
17924                __tmp.remaining(),
17925            )
17926        }
17927        __tmp.put_u16_le(self.sequence);
17928        __tmp.put_u8(self.target_system);
17929        __tmp.put_u8(self.target_component);
17930        __tmp.put_u8(self.length);
17931        __tmp.put_u8(self.first_message_offset);
17932        for val in &self.data {
17933            __tmp.put_u8(*val);
17934        }
17935        if matches!(version, MavlinkVersion::V2) {
17936            let len = __tmp.len();
17937            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17938        } else {
17939            __tmp.len()
17940        }
17941    }
17942}
17943#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
17944#[doc = ""]
17945#[doc = "ID: 267"]
17946#[derive(Debug, Clone, PartialEq)]
17947#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17948#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17949#[cfg_attr(feature = "ts", derive(TS))]
17950#[cfg_attr(feature = "ts", ts(export))]
17951pub struct LOGGING_DATA_ACKED_DATA {
17952    #[doc = "sequence number (can wrap)"]
17953    pub sequence: u16,
17954    #[doc = "system ID of the target"]
17955    pub target_system: u8,
17956    #[doc = "component ID of the target"]
17957    pub target_component: u8,
17958    #[doc = "data length"]
17959    pub length: u8,
17960    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
17961    pub first_message_offset: u8,
17962    #[doc = "logged data"]
17963    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17964    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17965    pub data: [u8; 249],
17966}
17967impl LOGGING_DATA_ACKED_DATA {
17968    pub const ENCODED_LEN: usize = 255usize;
17969    pub const DEFAULT: Self = Self {
17970        sequence: 0_u16,
17971        target_system: 0_u8,
17972        target_component: 0_u8,
17973        length: 0_u8,
17974        first_message_offset: 0_u8,
17975        data: [0_u8; 249usize],
17976    };
17977    #[cfg(feature = "arbitrary")]
17978    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17979        use arbitrary::{Arbitrary, Unstructured};
17980        let mut buf = [0u8; 1024];
17981        rng.fill_bytes(&mut buf);
17982        let mut unstructured = Unstructured::new(&buf);
17983        Self::arbitrary(&mut unstructured).unwrap_or_default()
17984    }
17985}
17986impl Default for LOGGING_DATA_ACKED_DATA {
17987    fn default() -> Self {
17988        Self::DEFAULT.clone()
17989    }
17990}
17991impl MessageData for LOGGING_DATA_ACKED_DATA {
17992    type Message = MavMessage;
17993    const ID: u32 = 267u32;
17994    const NAME: &'static str = "LOGGING_DATA_ACKED";
17995    const EXTRA_CRC: u8 = 35u8;
17996    const ENCODED_LEN: usize = 255usize;
17997    fn deser(
17998        _version: MavlinkVersion,
17999        __input: &[u8],
18000    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18001        let avail_len = __input.len();
18002        let mut payload_buf = [0; Self::ENCODED_LEN];
18003        let mut buf = if avail_len < Self::ENCODED_LEN {
18004            payload_buf[0..avail_len].copy_from_slice(__input);
18005            Bytes::new(&payload_buf)
18006        } else {
18007            Bytes::new(__input)
18008        };
18009        let mut __struct = Self::default();
18010        __struct.sequence = buf.get_u16_le();
18011        __struct.target_system = buf.get_u8();
18012        __struct.target_component = buf.get_u8();
18013        __struct.length = buf.get_u8();
18014        __struct.first_message_offset = buf.get_u8();
18015        for v in &mut __struct.data {
18016            let val = buf.get_u8();
18017            *v = val;
18018        }
18019        Ok(__struct)
18020    }
18021    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18022        let mut __tmp = BytesMut::new(bytes);
18023        #[allow(clippy::absurd_extreme_comparisons)]
18024        #[allow(unused_comparisons)]
18025        if __tmp.remaining() < Self::ENCODED_LEN {
18026            panic!(
18027                "buffer is too small (need {} bytes, but got {})",
18028                Self::ENCODED_LEN,
18029                __tmp.remaining(),
18030            )
18031        }
18032        __tmp.put_u16_le(self.sequence);
18033        __tmp.put_u8(self.target_system);
18034        __tmp.put_u8(self.target_component);
18035        __tmp.put_u8(self.length);
18036        __tmp.put_u8(self.first_message_offset);
18037        for val in &self.data {
18038            __tmp.put_u8(*val);
18039        }
18040        if matches!(version, MavlinkVersion::V2) {
18041            let len = __tmp.len();
18042            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18043        } else {
18044            __tmp.len()
18045        }
18046    }
18047}
18048#[doc = "Reply to LOG_REQUEST_DATA."]
18049#[doc = ""]
18050#[doc = "ID: 120"]
18051#[derive(Debug, Clone, PartialEq)]
18052#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18053#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18054#[cfg_attr(feature = "ts", derive(TS))]
18055#[cfg_attr(feature = "ts", ts(export))]
18056pub struct LOG_DATA_DATA {
18057    #[doc = "Offset into the log"]
18058    pub ofs: u32,
18059    #[doc = "Log id (from LOG_ENTRY reply)"]
18060    pub id: u16,
18061    #[doc = "Number of bytes (zero for end of log)"]
18062    pub count: u8,
18063    #[doc = "log data"]
18064    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18065    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18066    pub data: [u8; 90],
18067}
18068impl LOG_DATA_DATA {
18069    pub const ENCODED_LEN: usize = 97usize;
18070    pub const DEFAULT: Self = Self {
18071        ofs: 0_u32,
18072        id: 0_u16,
18073        count: 0_u8,
18074        data: [0_u8; 90usize],
18075    };
18076    #[cfg(feature = "arbitrary")]
18077    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18078        use arbitrary::{Arbitrary, Unstructured};
18079        let mut buf = [0u8; 1024];
18080        rng.fill_bytes(&mut buf);
18081        let mut unstructured = Unstructured::new(&buf);
18082        Self::arbitrary(&mut unstructured).unwrap_or_default()
18083    }
18084}
18085impl Default for LOG_DATA_DATA {
18086    fn default() -> Self {
18087        Self::DEFAULT.clone()
18088    }
18089}
18090impl MessageData for LOG_DATA_DATA {
18091    type Message = MavMessage;
18092    const ID: u32 = 120u32;
18093    const NAME: &'static str = "LOG_DATA";
18094    const EXTRA_CRC: u8 = 134u8;
18095    const ENCODED_LEN: usize = 97usize;
18096    fn deser(
18097        _version: MavlinkVersion,
18098        __input: &[u8],
18099    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18100        let avail_len = __input.len();
18101        let mut payload_buf = [0; Self::ENCODED_LEN];
18102        let mut buf = if avail_len < Self::ENCODED_LEN {
18103            payload_buf[0..avail_len].copy_from_slice(__input);
18104            Bytes::new(&payload_buf)
18105        } else {
18106            Bytes::new(__input)
18107        };
18108        let mut __struct = Self::default();
18109        __struct.ofs = buf.get_u32_le();
18110        __struct.id = buf.get_u16_le();
18111        __struct.count = buf.get_u8();
18112        for v in &mut __struct.data {
18113            let val = buf.get_u8();
18114            *v = val;
18115        }
18116        Ok(__struct)
18117    }
18118    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18119        let mut __tmp = BytesMut::new(bytes);
18120        #[allow(clippy::absurd_extreme_comparisons)]
18121        #[allow(unused_comparisons)]
18122        if __tmp.remaining() < Self::ENCODED_LEN {
18123            panic!(
18124                "buffer is too small (need {} bytes, but got {})",
18125                Self::ENCODED_LEN,
18126                __tmp.remaining(),
18127            )
18128        }
18129        __tmp.put_u32_le(self.ofs);
18130        __tmp.put_u16_le(self.id);
18131        __tmp.put_u8(self.count);
18132        for val in &self.data {
18133            __tmp.put_u8(*val);
18134        }
18135        if matches!(version, MavlinkVersion::V2) {
18136            let len = __tmp.len();
18137            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18138        } else {
18139            __tmp.len()
18140        }
18141    }
18142}
18143#[doc = "Reply to LOG_REQUEST_LIST."]
18144#[doc = ""]
18145#[doc = "ID: 118"]
18146#[derive(Debug, Clone, PartialEq)]
18147#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18148#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18149#[cfg_attr(feature = "ts", derive(TS))]
18150#[cfg_attr(feature = "ts", ts(export))]
18151pub struct LOG_ENTRY_DATA {
18152    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
18153    pub time_utc: u32,
18154    #[doc = "Size of the log (may be approximate)"]
18155    pub size: u32,
18156    #[doc = "Log id"]
18157    pub id: u16,
18158    #[doc = "Total number of logs"]
18159    pub num_logs: u16,
18160    #[doc = "High log number"]
18161    pub last_log_num: u16,
18162}
18163impl LOG_ENTRY_DATA {
18164    pub const ENCODED_LEN: usize = 14usize;
18165    pub const DEFAULT: Self = Self {
18166        time_utc: 0_u32,
18167        size: 0_u32,
18168        id: 0_u16,
18169        num_logs: 0_u16,
18170        last_log_num: 0_u16,
18171    };
18172    #[cfg(feature = "arbitrary")]
18173    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18174        use arbitrary::{Arbitrary, Unstructured};
18175        let mut buf = [0u8; 1024];
18176        rng.fill_bytes(&mut buf);
18177        let mut unstructured = Unstructured::new(&buf);
18178        Self::arbitrary(&mut unstructured).unwrap_or_default()
18179    }
18180}
18181impl Default for LOG_ENTRY_DATA {
18182    fn default() -> Self {
18183        Self::DEFAULT.clone()
18184    }
18185}
18186impl MessageData for LOG_ENTRY_DATA {
18187    type Message = MavMessage;
18188    const ID: u32 = 118u32;
18189    const NAME: &'static str = "LOG_ENTRY";
18190    const EXTRA_CRC: u8 = 56u8;
18191    const ENCODED_LEN: usize = 14usize;
18192    fn deser(
18193        _version: MavlinkVersion,
18194        __input: &[u8],
18195    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18196        let avail_len = __input.len();
18197        let mut payload_buf = [0; Self::ENCODED_LEN];
18198        let mut buf = if avail_len < Self::ENCODED_LEN {
18199            payload_buf[0..avail_len].copy_from_slice(__input);
18200            Bytes::new(&payload_buf)
18201        } else {
18202            Bytes::new(__input)
18203        };
18204        let mut __struct = Self::default();
18205        __struct.time_utc = buf.get_u32_le();
18206        __struct.size = buf.get_u32_le();
18207        __struct.id = buf.get_u16_le();
18208        __struct.num_logs = buf.get_u16_le();
18209        __struct.last_log_num = buf.get_u16_le();
18210        Ok(__struct)
18211    }
18212    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18213        let mut __tmp = BytesMut::new(bytes);
18214        #[allow(clippy::absurd_extreme_comparisons)]
18215        #[allow(unused_comparisons)]
18216        if __tmp.remaining() < Self::ENCODED_LEN {
18217            panic!(
18218                "buffer is too small (need {} bytes, but got {})",
18219                Self::ENCODED_LEN,
18220                __tmp.remaining(),
18221            )
18222        }
18223        __tmp.put_u32_le(self.time_utc);
18224        __tmp.put_u32_le(self.size);
18225        __tmp.put_u16_le(self.id);
18226        __tmp.put_u16_le(self.num_logs);
18227        __tmp.put_u16_le(self.last_log_num);
18228        if matches!(version, MavlinkVersion::V2) {
18229            let len = __tmp.len();
18230            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18231        } else {
18232            __tmp.len()
18233        }
18234    }
18235}
18236#[doc = "Erase all logs."]
18237#[doc = ""]
18238#[doc = "ID: 121"]
18239#[derive(Debug, Clone, PartialEq)]
18240#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18241#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18242#[cfg_attr(feature = "ts", derive(TS))]
18243#[cfg_attr(feature = "ts", ts(export))]
18244pub struct LOG_ERASE_DATA {
18245    #[doc = "System ID"]
18246    pub target_system: u8,
18247    #[doc = "Component ID"]
18248    pub target_component: u8,
18249}
18250impl LOG_ERASE_DATA {
18251    pub const ENCODED_LEN: usize = 2usize;
18252    pub const DEFAULT: Self = Self {
18253        target_system: 0_u8,
18254        target_component: 0_u8,
18255    };
18256    #[cfg(feature = "arbitrary")]
18257    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18258        use arbitrary::{Arbitrary, Unstructured};
18259        let mut buf = [0u8; 1024];
18260        rng.fill_bytes(&mut buf);
18261        let mut unstructured = Unstructured::new(&buf);
18262        Self::arbitrary(&mut unstructured).unwrap_or_default()
18263    }
18264}
18265impl Default for LOG_ERASE_DATA {
18266    fn default() -> Self {
18267        Self::DEFAULT.clone()
18268    }
18269}
18270impl MessageData for LOG_ERASE_DATA {
18271    type Message = MavMessage;
18272    const ID: u32 = 121u32;
18273    const NAME: &'static str = "LOG_ERASE";
18274    const EXTRA_CRC: u8 = 237u8;
18275    const ENCODED_LEN: usize = 2usize;
18276    fn deser(
18277        _version: MavlinkVersion,
18278        __input: &[u8],
18279    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18280        let avail_len = __input.len();
18281        let mut payload_buf = [0; Self::ENCODED_LEN];
18282        let mut buf = if avail_len < Self::ENCODED_LEN {
18283            payload_buf[0..avail_len].copy_from_slice(__input);
18284            Bytes::new(&payload_buf)
18285        } else {
18286            Bytes::new(__input)
18287        };
18288        let mut __struct = Self::default();
18289        __struct.target_system = buf.get_u8();
18290        __struct.target_component = buf.get_u8();
18291        Ok(__struct)
18292    }
18293    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18294        let mut __tmp = BytesMut::new(bytes);
18295        #[allow(clippy::absurd_extreme_comparisons)]
18296        #[allow(unused_comparisons)]
18297        if __tmp.remaining() < Self::ENCODED_LEN {
18298            panic!(
18299                "buffer is too small (need {} bytes, but got {})",
18300                Self::ENCODED_LEN,
18301                __tmp.remaining(),
18302            )
18303        }
18304        __tmp.put_u8(self.target_system);
18305        __tmp.put_u8(self.target_component);
18306        if matches!(version, MavlinkVersion::V2) {
18307            let len = __tmp.len();
18308            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18309        } else {
18310            __tmp.len()
18311        }
18312    }
18313}
18314#[doc = "Request a chunk of a log."]
18315#[doc = ""]
18316#[doc = "ID: 119"]
18317#[derive(Debug, Clone, PartialEq)]
18318#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18319#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18320#[cfg_attr(feature = "ts", derive(TS))]
18321#[cfg_attr(feature = "ts", ts(export))]
18322pub struct LOG_REQUEST_DATA_DATA {
18323    #[doc = "Offset into the log"]
18324    pub ofs: u32,
18325    #[doc = "Number of bytes"]
18326    pub count: u32,
18327    #[doc = "Log id (from LOG_ENTRY reply)"]
18328    pub id: u16,
18329    #[doc = "System ID"]
18330    pub target_system: u8,
18331    #[doc = "Component ID"]
18332    pub target_component: u8,
18333}
18334impl LOG_REQUEST_DATA_DATA {
18335    pub const ENCODED_LEN: usize = 12usize;
18336    pub const DEFAULT: Self = Self {
18337        ofs: 0_u32,
18338        count: 0_u32,
18339        id: 0_u16,
18340        target_system: 0_u8,
18341        target_component: 0_u8,
18342    };
18343    #[cfg(feature = "arbitrary")]
18344    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18345        use arbitrary::{Arbitrary, Unstructured};
18346        let mut buf = [0u8; 1024];
18347        rng.fill_bytes(&mut buf);
18348        let mut unstructured = Unstructured::new(&buf);
18349        Self::arbitrary(&mut unstructured).unwrap_or_default()
18350    }
18351}
18352impl Default for LOG_REQUEST_DATA_DATA {
18353    fn default() -> Self {
18354        Self::DEFAULT.clone()
18355    }
18356}
18357impl MessageData for LOG_REQUEST_DATA_DATA {
18358    type Message = MavMessage;
18359    const ID: u32 = 119u32;
18360    const NAME: &'static str = "LOG_REQUEST_DATA";
18361    const EXTRA_CRC: u8 = 116u8;
18362    const ENCODED_LEN: usize = 12usize;
18363    fn deser(
18364        _version: MavlinkVersion,
18365        __input: &[u8],
18366    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18367        let avail_len = __input.len();
18368        let mut payload_buf = [0; Self::ENCODED_LEN];
18369        let mut buf = if avail_len < Self::ENCODED_LEN {
18370            payload_buf[0..avail_len].copy_from_slice(__input);
18371            Bytes::new(&payload_buf)
18372        } else {
18373            Bytes::new(__input)
18374        };
18375        let mut __struct = Self::default();
18376        __struct.ofs = buf.get_u32_le();
18377        __struct.count = buf.get_u32_le();
18378        __struct.id = buf.get_u16_le();
18379        __struct.target_system = buf.get_u8();
18380        __struct.target_component = buf.get_u8();
18381        Ok(__struct)
18382    }
18383    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18384        let mut __tmp = BytesMut::new(bytes);
18385        #[allow(clippy::absurd_extreme_comparisons)]
18386        #[allow(unused_comparisons)]
18387        if __tmp.remaining() < Self::ENCODED_LEN {
18388            panic!(
18389                "buffer is too small (need {} bytes, but got {})",
18390                Self::ENCODED_LEN,
18391                __tmp.remaining(),
18392            )
18393        }
18394        __tmp.put_u32_le(self.ofs);
18395        __tmp.put_u32_le(self.count);
18396        __tmp.put_u16_le(self.id);
18397        __tmp.put_u8(self.target_system);
18398        __tmp.put_u8(self.target_component);
18399        if matches!(version, MavlinkVersion::V2) {
18400            let len = __tmp.len();
18401            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18402        } else {
18403            __tmp.len()
18404        }
18405    }
18406}
18407#[doc = "Stop log transfer and resume normal logging."]
18408#[doc = ""]
18409#[doc = "ID: 122"]
18410#[derive(Debug, Clone, PartialEq)]
18411#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18412#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18413#[cfg_attr(feature = "ts", derive(TS))]
18414#[cfg_attr(feature = "ts", ts(export))]
18415pub struct LOG_REQUEST_END_DATA {
18416    #[doc = "System ID"]
18417    pub target_system: u8,
18418    #[doc = "Component ID"]
18419    pub target_component: u8,
18420}
18421impl LOG_REQUEST_END_DATA {
18422    pub const ENCODED_LEN: usize = 2usize;
18423    pub const DEFAULT: Self = Self {
18424        target_system: 0_u8,
18425        target_component: 0_u8,
18426    };
18427    #[cfg(feature = "arbitrary")]
18428    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18429        use arbitrary::{Arbitrary, Unstructured};
18430        let mut buf = [0u8; 1024];
18431        rng.fill_bytes(&mut buf);
18432        let mut unstructured = Unstructured::new(&buf);
18433        Self::arbitrary(&mut unstructured).unwrap_or_default()
18434    }
18435}
18436impl Default for LOG_REQUEST_END_DATA {
18437    fn default() -> Self {
18438        Self::DEFAULT.clone()
18439    }
18440}
18441impl MessageData for LOG_REQUEST_END_DATA {
18442    type Message = MavMessage;
18443    const ID: u32 = 122u32;
18444    const NAME: &'static str = "LOG_REQUEST_END";
18445    const EXTRA_CRC: u8 = 203u8;
18446    const ENCODED_LEN: usize = 2usize;
18447    fn deser(
18448        _version: MavlinkVersion,
18449        __input: &[u8],
18450    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18451        let avail_len = __input.len();
18452        let mut payload_buf = [0; Self::ENCODED_LEN];
18453        let mut buf = if avail_len < Self::ENCODED_LEN {
18454            payload_buf[0..avail_len].copy_from_slice(__input);
18455            Bytes::new(&payload_buf)
18456        } else {
18457            Bytes::new(__input)
18458        };
18459        let mut __struct = Self::default();
18460        __struct.target_system = buf.get_u8();
18461        __struct.target_component = buf.get_u8();
18462        Ok(__struct)
18463    }
18464    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18465        let mut __tmp = BytesMut::new(bytes);
18466        #[allow(clippy::absurd_extreme_comparisons)]
18467        #[allow(unused_comparisons)]
18468        if __tmp.remaining() < Self::ENCODED_LEN {
18469            panic!(
18470                "buffer is too small (need {} bytes, but got {})",
18471                Self::ENCODED_LEN,
18472                __tmp.remaining(),
18473            )
18474        }
18475        __tmp.put_u8(self.target_system);
18476        __tmp.put_u8(self.target_component);
18477        if matches!(version, MavlinkVersion::V2) {
18478            let len = __tmp.len();
18479            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18480        } else {
18481            __tmp.len()
18482        }
18483    }
18484}
18485#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
18486#[doc = ""]
18487#[doc = "ID: 117"]
18488#[derive(Debug, Clone, PartialEq)]
18489#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18490#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18491#[cfg_attr(feature = "ts", derive(TS))]
18492#[cfg_attr(feature = "ts", ts(export))]
18493pub struct LOG_REQUEST_LIST_DATA {
18494    #[doc = "First log id (0 for first available)"]
18495    pub start: u16,
18496    #[doc = "Last log id (0xffff for last available)"]
18497    pub end: u16,
18498    #[doc = "System ID"]
18499    pub target_system: u8,
18500    #[doc = "Component ID"]
18501    pub target_component: u8,
18502}
18503impl LOG_REQUEST_LIST_DATA {
18504    pub const ENCODED_LEN: usize = 6usize;
18505    pub const DEFAULT: Self = Self {
18506        start: 0_u16,
18507        end: 0_u16,
18508        target_system: 0_u8,
18509        target_component: 0_u8,
18510    };
18511    #[cfg(feature = "arbitrary")]
18512    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18513        use arbitrary::{Arbitrary, Unstructured};
18514        let mut buf = [0u8; 1024];
18515        rng.fill_bytes(&mut buf);
18516        let mut unstructured = Unstructured::new(&buf);
18517        Self::arbitrary(&mut unstructured).unwrap_or_default()
18518    }
18519}
18520impl Default for LOG_REQUEST_LIST_DATA {
18521    fn default() -> Self {
18522        Self::DEFAULT.clone()
18523    }
18524}
18525impl MessageData for LOG_REQUEST_LIST_DATA {
18526    type Message = MavMessage;
18527    const ID: u32 = 117u32;
18528    const NAME: &'static str = "LOG_REQUEST_LIST";
18529    const EXTRA_CRC: u8 = 128u8;
18530    const ENCODED_LEN: usize = 6usize;
18531    fn deser(
18532        _version: MavlinkVersion,
18533        __input: &[u8],
18534    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18535        let avail_len = __input.len();
18536        let mut payload_buf = [0; Self::ENCODED_LEN];
18537        let mut buf = if avail_len < Self::ENCODED_LEN {
18538            payload_buf[0..avail_len].copy_from_slice(__input);
18539            Bytes::new(&payload_buf)
18540        } else {
18541            Bytes::new(__input)
18542        };
18543        let mut __struct = Self::default();
18544        __struct.start = buf.get_u16_le();
18545        __struct.end = buf.get_u16_le();
18546        __struct.target_system = buf.get_u8();
18547        __struct.target_component = buf.get_u8();
18548        Ok(__struct)
18549    }
18550    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18551        let mut __tmp = BytesMut::new(bytes);
18552        #[allow(clippy::absurd_extreme_comparisons)]
18553        #[allow(unused_comparisons)]
18554        if __tmp.remaining() < Self::ENCODED_LEN {
18555            panic!(
18556                "buffer is too small (need {} bytes, but got {})",
18557                Self::ENCODED_LEN,
18558                __tmp.remaining(),
18559            )
18560        }
18561        __tmp.put_u16_le(self.start);
18562        __tmp.put_u16_le(self.end);
18563        __tmp.put_u8(self.target_system);
18564        __tmp.put_u8(self.target_component);
18565        if matches!(version, MavlinkVersion::V2) {
18566            let len = __tmp.len();
18567            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18568        } else {
18569            __tmp.len()
18570        }
18571    }
18572}
18573#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
18574#[doc = ""]
18575#[doc = "ID: 192"]
18576#[derive(Debug, Clone, PartialEq)]
18577#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18578#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18579#[cfg_attr(feature = "ts", derive(TS))]
18580#[cfg_attr(feature = "ts", ts(export))]
18581pub struct MAG_CAL_REPORT_DATA {
18582    #[doc = "RMS milligauss residuals."]
18583    pub fitness: f32,
18584    #[doc = "X offset."]
18585    pub ofs_x: f32,
18586    #[doc = "Y offset."]
18587    pub ofs_y: f32,
18588    #[doc = "Z offset."]
18589    pub ofs_z: f32,
18590    #[doc = "X diagonal (matrix 11)."]
18591    pub diag_x: f32,
18592    #[doc = "Y diagonal (matrix 22)."]
18593    pub diag_y: f32,
18594    #[doc = "Z diagonal (matrix 33)."]
18595    pub diag_z: f32,
18596    #[doc = "X off-diagonal (matrix 12 and 21)."]
18597    pub offdiag_x: f32,
18598    #[doc = "Y off-diagonal (matrix 13 and 31)."]
18599    pub offdiag_y: f32,
18600    #[doc = "Z off-diagonal (matrix 32 and 23)."]
18601    pub offdiag_z: f32,
18602    #[doc = "Compass being calibrated."]
18603    pub compass_id: u8,
18604    #[doc = "Bitmask of compasses being calibrated."]
18605    pub cal_mask: u8,
18606    #[doc = "Calibration Status."]
18607    pub cal_status: MagCalStatus,
18608    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
18609    pub autosaved: u8,
18610    #[doc = "Confidence in orientation (higher is better)."]
18611    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18612    pub orientation_confidence: f32,
18613    #[doc = "orientation before calibration."]
18614    #[cfg_attr(feature = "serde", serde(default))]
18615    pub old_orientation: MavSensorOrientation,
18616    #[doc = "orientation after calibration."]
18617    #[cfg_attr(feature = "serde", serde(default))]
18618    pub new_orientation: MavSensorOrientation,
18619    #[doc = "field radius correction factor"]
18620    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18621    pub scale_factor: f32,
18622}
18623impl MAG_CAL_REPORT_DATA {
18624    pub const ENCODED_LEN: usize = 54usize;
18625    pub const DEFAULT: Self = Self {
18626        fitness: 0.0_f32,
18627        ofs_x: 0.0_f32,
18628        ofs_y: 0.0_f32,
18629        ofs_z: 0.0_f32,
18630        diag_x: 0.0_f32,
18631        diag_y: 0.0_f32,
18632        diag_z: 0.0_f32,
18633        offdiag_x: 0.0_f32,
18634        offdiag_y: 0.0_f32,
18635        offdiag_z: 0.0_f32,
18636        compass_id: 0_u8,
18637        cal_mask: 0_u8,
18638        cal_status: MagCalStatus::DEFAULT,
18639        autosaved: 0_u8,
18640        orientation_confidence: 0.0_f32,
18641        old_orientation: MavSensorOrientation::DEFAULT,
18642        new_orientation: MavSensorOrientation::DEFAULT,
18643        scale_factor: 0.0_f32,
18644    };
18645    #[cfg(feature = "arbitrary")]
18646    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18647        use arbitrary::{Arbitrary, Unstructured};
18648        let mut buf = [0u8; 1024];
18649        rng.fill_bytes(&mut buf);
18650        let mut unstructured = Unstructured::new(&buf);
18651        Self::arbitrary(&mut unstructured).unwrap_or_default()
18652    }
18653}
18654impl Default for MAG_CAL_REPORT_DATA {
18655    fn default() -> Self {
18656        Self::DEFAULT.clone()
18657    }
18658}
18659impl MessageData for MAG_CAL_REPORT_DATA {
18660    type Message = MavMessage;
18661    const ID: u32 = 192u32;
18662    const NAME: &'static str = "MAG_CAL_REPORT";
18663    const EXTRA_CRC: u8 = 36u8;
18664    const ENCODED_LEN: usize = 54usize;
18665    fn deser(
18666        _version: MavlinkVersion,
18667        __input: &[u8],
18668    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18669        let avail_len = __input.len();
18670        let mut payload_buf = [0; Self::ENCODED_LEN];
18671        let mut buf = if avail_len < Self::ENCODED_LEN {
18672            payload_buf[0..avail_len].copy_from_slice(__input);
18673            Bytes::new(&payload_buf)
18674        } else {
18675            Bytes::new(__input)
18676        };
18677        let mut __struct = Self::default();
18678        __struct.fitness = buf.get_f32_le();
18679        __struct.ofs_x = buf.get_f32_le();
18680        __struct.ofs_y = buf.get_f32_le();
18681        __struct.ofs_z = buf.get_f32_le();
18682        __struct.diag_x = buf.get_f32_le();
18683        __struct.diag_y = buf.get_f32_le();
18684        __struct.diag_z = buf.get_f32_le();
18685        __struct.offdiag_x = buf.get_f32_le();
18686        __struct.offdiag_y = buf.get_f32_le();
18687        __struct.offdiag_z = buf.get_f32_le();
18688        __struct.compass_id = buf.get_u8();
18689        __struct.cal_mask = buf.get_u8();
18690        let tmp = buf.get_u8();
18691        __struct.cal_status =
18692            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18693                enum_type: "MagCalStatus",
18694                value: tmp as u32,
18695            })?;
18696        __struct.autosaved = buf.get_u8();
18697        __struct.orientation_confidence = buf.get_f32_le();
18698        let tmp = buf.get_u8();
18699        __struct.old_orientation =
18700            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18701                enum_type: "MavSensorOrientation",
18702                value: tmp as u32,
18703            })?;
18704        let tmp = buf.get_u8();
18705        __struct.new_orientation =
18706            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18707                enum_type: "MavSensorOrientation",
18708                value: tmp as u32,
18709            })?;
18710        __struct.scale_factor = buf.get_f32_le();
18711        Ok(__struct)
18712    }
18713    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18714        let mut __tmp = BytesMut::new(bytes);
18715        #[allow(clippy::absurd_extreme_comparisons)]
18716        #[allow(unused_comparisons)]
18717        if __tmp.remaining() < Self::ENCODED_LEN {
18718            panic!(
18719                "buffer is too small (need {} bytes, but got {})",
18720                Self::ENCODED_LEN,
18721                __tmp.remaining(),
18722            )
18723        }
18724        __tmp.put_f32_le(self.fitness);
18725        __tmp.put_f32_le(self.ofs_x);
18726        __tmp.put_f32_le(self.ofs_y);
18727        __tmp.put_f32_le(self.ofs_z);
18728        __tmp.put_f32_le(self.diag_x);
18729        __tmp.put_f32_le(self.diag_y);
18730        __tmp.put_f32_le(self.diag_z);
18731        __tmp.put_f32_le(self.offdiag_x);
18732        __tmp.put_f32_le(self.offdiag_y);
18733        __tmp.put_f32_le(self.offdiag_z);
18734        __tmp.put_u8(self.compass_id);
18735        __tmp.put_u8(self.cal_mask);
18736        __tmp.put_u8(self.cal_status as u8);
18737        __tmp.put_u8(self.autosaved);
18738        if matches!(version, MavlinkVersion::V2) {
18739            __tmp.put_f32_le(self.orientation_confidence);
18740            __tmp.put_u8(self.old_orientation as u8);
18741            __tmp.put_u8(self.new_orientation as u8);
18742            __tmp.put_f32_le(self.scale_factor);
18743            let len = __tmp.len();
18744            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18745        } else {
18746            __tmp.len()
18747        }
18748    }
18749}
18750#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
18751#[doc = ""]
18752#[doc = "ID: 69"]
18753#[derive(Debug, Clone, PartialEq)]
18754#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18755#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18756#[cfg_attr(feature = "ts", derive(TS))]
18757#[cfg_attr(feature = "ts", ts(export))]
18758pub struct MANUAL_CONTROL_DATA {
18759    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
18760    pub x: i16,
18761    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
18762    pub y: i16,
18763    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
18764    pub z: i16,
18765    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
18766    pub r: i16,
18767    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
18768    pub buttons: u16,
18769    #[doc = "The system to be controlled."]
18770    pub target: u8,
18771    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
18772    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18773    pub buttons2: u16,
18774    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
18775    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18776    pub enabled_extensions: u8,
18777    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
18778    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18779    pub s: i16,
18780    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
18781    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18782    pub t: i16,
18783    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
18784    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18785    pub aux1: i16,
18786    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
18787    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18788    pub aux2: i16,
18789    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
18790    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18791    pub aux3: i16,
18792    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
18793    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18794    pub aux4: i16,
18795    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
18796    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18797    pub aux5: i16,
18798    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
18799    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18800    pub aux6: i16,
18801}
18802impl MANUAL_CONTROL_DATA {
18803    pub const ENCODED_LEN: usize = 30usize;
18804    pub const DEFAULT: Self = Self {
18805        x: 0_i16,
18806        y: 0_i16,
18807        z: 0_i16,
18808        r: 0_i16,
18809        buttons: 0_u16,
18810        target: 0_u8,
18811        buttons2: 0_u16,
18812        enabled_extensions: 0_u8,
18813        s: 0_i16,
18814        t: 0_i16,
18815        aux1: 0_i16,
18816        aux2: 0_i16,
18817        aux3: 0_i16,
18818        aux4: 0_i16,
18819        aux5: 0_i16,
18820        aux6: 0_i16,
18821    };
18822    #[cfg(feature = "arbitrary")]
18823    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18824        use arbitrary::{Arbitrary, Unstructured};
18825        let mut buf = [0u8; 1024];
18826        rng.fill_bytes(&mut buf);
18827        let mut unstructured = Unstructured::new(&buf);
18828        Self::arbitrary(&mut unstructured).unwrap_or_default()
18829    }
18830}
18831impl Default for MANUAL_CONTROL_DATA {
18832    fn default() -> Self {
18833        Self::DEFAULT.clone()
18834    }
18835}
18836impl MessageData for MANUAL_CONTROL_DATA {
18837    type Message = MavMessage;
18838    const ID: u32 = 69u32;
18839    const NAME: &'static str = "MANUAL_CONTROL";
18840    const EXTRA_CRC: u8 = 243u8;
18841    const ENCODED_LEN: usize = 30usize;
18842    fn deser(
18843        _version: MavlinkVersion,
18844        __input: &[u8],
18845    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18846        let avail_len = __input.len();
18847        let mut payload_buf = [0; Self::ENCODED_LEN];
18848        let mut buf = if avail_len < Self::ENCODED_LEN {
18849            payload_buf[0..avail_len].copy_from_slice(__input);
18850            Bytes::new(&payload_buf)
18851        } else {
18852            Bytes::new(__input)
18853        };
18854        let mut __struct = Self::default();
18855        __struct.x = buf.get_i16_le();
18856        __struct.y = buf.get_i16_le();
18857        __struct.z = buf.get_i16_le();
18858        __struct.r = buf.get_i16_le();
18859        __struct.buttons = buf.get_u16_le();
18860        __struct.target = buf.get_u8();
18861        __struct.buttons2 = buf.get_u16_le();
18862        __struct.enabled_extensions = buf.get_u8();
18863        __struct.s = buf.get_i16_le();
18864        __struct.t = buf.get_i16_le();
18865        __struct.aux1 = buf.get_i16_le();
18866        __struct.aux2 = buf.get_i16_le();
18867        __struct.aux3 = buf.get_i16_le();
18868        __struct.aux4 = buf.get_i16_le();
18869        __struct.aux5 = buf.get_i16_le();
18870        __struct.aux6 = buf.get_i16_le();
18871        Ok(__struct)
18872    }
18873    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18874        let mut __tmp = BytesMut::new(bytes);
18875        #[allow(clippy::absurd_extreme_comparisons)]
18876        #[allow(unused_comparisons)]
18877        if __tmp.remaining() < Self::ENCODED_LEN {
18878            panic!(
18879                "buffer is too small (need {} bytes, but got {})",
18880                Self::ENCODED_LEN,
18881                __tmp.remaining(),
18882            )
18883        }
18884        __tmp.put_i16_le(self.x);
18885        __tmp.put_i16_le(self.y);
18886        __tmp.put_i16_le(self.z);
18887        __tmp.put_i16_le(self.r);
18888        __tmp.put_u16_le(self.buttons);
18889        __tmp.put_u8(self.target);
18890        if matches!(version, MavlinkVersion::V2) {
18891            __tmp.put_u16_le(self.buttons2);
18892            __tmp.put_u8(self.enabled_extensions);
18893            __tmp.put_i16_le(self.s);
18894            __tmp.put_i16_le(self.t);
18895            __tmp.put_i16_le(self.aux1);
18896            __tmp.put_i16_le(self.aux2);
18897            __tmp.put_i16_le(self.aux3);
18898            __tmp.put_i16_le(self.aux4);
18899            __tmp.put_i16_le(self.aux5);
18900            __tmp.put_i16_le(self.aux6);
18901            let len = __tmp.len();
18902            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18903        } else {
18904            __tmp.len()
18905        }
18906    }
18907}
18908#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
18909#[doc = ""]
18910#[doc = "ID: 81"]
18911#[derive(Debug, Clone, PartialEq)]
18912#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18913#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18914#[cfg_attr(feature = "ts", derive(TS))]
18915#[cfg_attr(feature = "ts", ts(export))]
18916pub struct MANUAL_SETPOINT_DATA {
18917    #[doc = "Timestamp (time since system boot)."]
18918    pub time_boot_ms: u32,
18919    #[doc = "Desired roll rate"]
18920    pub roll: f32,
18921    #[doc = "Desired pitch rate"]
18922    pub pitch: f32,
18923    #[doc = "Desired yaw rate"]
18924    pub yaw: f32,
18925    #[doc = "Collective thrust, normalized to 0 .. 1"]
18926    pub thrust: f32,
18927    #[doc = "Flight mode switch position, 0.. 255"]
18928    pub mode_switch: u8,
18929    #[doc = "Override mode switch position, 0.. 255"]
18930    pub manual_override_switch: u8,
18931}
18932impl MANUAL_SETPOINT_DATA {
18933    pub const ENCODED_LEN: usize = 22usize;
18934    pub const DEFAULT: Self = Self {
18935        time_boot_ms: 0_u32,
18936        roll: 0.0_f32,
18937        pitch: 0.0_f32,
18938        yaw: 0.0_f32,
18939        thrust: 0.0_f32,
18940        mode_switch: 0_u8,
18941        manual_override_switch: 0_u8,
18942    };
18943    #[cfg(feature = "arbitrary")]
18944    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18945        use arbitrary::{Arbitrary, Unstructured};
18946        let mut buf = [0u8; 1024];
18947        rng.fill_bytes(&mut buf);
18948        let mut unstructured = Unstructured::new(&buf);
18949        Self::arbitrary(&mut unstructured).unwrap_or_default()
18950    }
18951}
18952impl Default for MANUAL_SETPOINT_DATA {
18953    fn default() -> Self {
18954        Self::DEFAULT.clone()
18955    }
18956}
18957impl MessageData for MANUAL_SETPOINT_DATA {
18958    type Message = MavMessage;
18959    const ID: u32 = 81u32;
18960    const NAME: &'static str = "MANUAL_SETPOINT";
18961    const EXTRA_CRC: u8 = 106u8;
18962    const ENCODED_LEN: usize = 22usize;
18963    fn deser(
18964        _version: MavlinkVersion,
18965        __input: &[u8],
18966    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18967        let avail_len = __input.len();
18968        let mut payload_buf = [0; Self::ENCODED_LEN];
18969        let mut buf = if avail_len < Self::ENCODED_LEN {
18970            payload_buf[0..avail_len].copy_from_slice(__input);
18971            Bytes::new(&payload_buf)
18972        } else {
18973            Bytes::new(__input)
18974        };
18975        let mut __struct = Self::default();
18976        __struct.time_boot_ms = buf.get_u32_le();
18977        __struct.roll = buf.get_f32_le();
18978        __struct.pitch = buf.get_f32_le();
18979        __struct.yaw = buf.get_f32_le();
18980        __struct.thrust = buf.get_f32_le();
18981        __struct.mode_switch = buf.get_u8();
18982        __struct.manual_override_switch = buf.get_u8();
18983        Ok(__struct)
18984    }
18985    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18986        let mut __tmp = BytesMut::new(bytes);
18987        #[allow(clippy::absurd_extreme_comparisons)]
18988        #[allow(unused_comparisons)]
18989        if __tmp.remaining() < Self::ENCODED_LEN {
18990            panic!(
18991                "buffer is too small (need {} bytes, but got {})",
18992                Self::ENCODED_LEN,
18993                __tmp.remaining(),
18994            )
18995        }
18996        __tmp.put_u32_le(self.time_boot_ms);
18997        __tmp.put_f32_le(self.roll);
18998        __tmp.put_f32_le(self.pitch);
18999        __tmp.put_f32_le(self.yaw);
19000        __tmp.put_f32_le(self.thrust);
19001        __tmp.put_u8(self.mode_switch);
19002        __tmp.put_u8(self.manual_override_switch);
19003        if matches!(version, MavlinkVersion::V2) {
19004            let len = __tmp.len();
19005            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19006        } else {
19007            __tmp.len()
19008        }
19009    }
19010}
19011#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
19012#[doc = ""]
19013#[doc = "ID: 249"]
19014#[derive(Debug, Clone, PartialEq)]
19015#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19016#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19017#[cfg_attr(feature = "ts", derive(TS))]
19018#[cfg_attr(feature = "ts", ts(export))]
19019pub struct MEMORY_VECT_DATA {
19020    #[doc = "Starting address of the debug variables"]
19021    pub address: u16,
19022    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
19023    pub ver: u8,
19024    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
19025    pub mavtype: u8,
19026    #[doc = "Memory contents at specified address"]
19027    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19028    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19029    pub value: [i8; 32],
19030}
19031impl MEMORY_VECT_DATA {
19032    pub const ENCODED_LEN: usize = 36usize;
19033    pub const DEFAULT: Self = Self {
19034        address: 0_u16,
19035        ver: 0_u8,
19036        mavtype: 0_u8,
19037        value: [0_i8; 32usize],
19038    };
19039    #[cfg(feature = "arbitrary")]
19040    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19041        use arbitrary::{Arbitrary, Unstructured};
19042        let mut buf = [0u8; 1024];
19043        rng.fill_bytes(&mut buf);
19044        let mut unstructured = Unstructured::new(&buf);
19045        Self::arbitrary(&mut unstructured).unwrap_or_default()
19046    }
19047}
19048impl Default for MEMORY_VECT_DATA {
19049    fn default() -> Self {
19050        Self::DEFAULT.clone()
19051    }
19052}
19053impl MessageData for MEMORY_VECT_DATA {
19054    type Message = MavMessage;
19055    const ID: u32 = 249u32;
19056    const NAME: &'static str = "MEMORY_VECT";
19057    const EXTRA_CRC: u8 = 204u8;
19058    const ENCODED_LEN: usize = 36usize;
19059    fn deser(
19060        _version: MavlinkVersion,
19061        __input: &[u8],
19062    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19063        let avail_len = __input.len();
19064        let mut payload_buf = [0; Self::ENCODED_LEN];
19065        let mut buf = if avail_len < Self::ENCODED_LEN {
19066            payload_buf[0..avail_len].copy_from_slice(__input);
19067            Bytes::new(&payload_buf)
19068        } else {
19069            Bytes::new(__input)
19070        };
19071        let mut __struct = Self::default();
19072        __struct.address = buf.get_u16_le();
19073        __struct.ver = buf.get_u8();
19074        __struct.mavtype = buf.get_u8();
19075        for v in &mut __struct.value {
19076            let val = buf.get_i8();
19077            *v = val;
19078        }
19079        Ok(__struct)
19080    }
19081    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19082        let mut __tmp = BytesMut::new(bytes);
19083        #[allow(clippy::absurd_extreme_comparisons)]
19084        #[allow(unused_comparisons)]
19085        if __tmp.remaining() < Self::ENCODED_LEN {
19086            panic!(
19087                "buffer is too small (need {} bytes, but got {})",
19088                Self::ENCODED_LEN,
19089                __tmp.remaining(),
19090            )
19091        }
19092        __tmp.put_u16_le(self.address);
19093        __tmp.put_u8(self.ver);
19094        __tmp.put_u8(self.mavtype);
19095        for val in &self.value {
19096            __tmp.put_i8(*val);
19097        }
19098        if matches!(version, MavlinkVersion::V2) {
19099            let len = __tmp.len();
19100            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19101        } else {
19102            __tmp.len()
19103        }
19104    }
19105}
19106#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
19107#[doc = ""]
19108#[doc = "ID: 244"]
19109#[derive(Debug, Clone, PartialEq)]
19110#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19111#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19112#[cfg_attr(feature = "ts", derive(TS))]
19113#[cfg_attr(feature = "ts", ts(export))]
19114pub struct MESSAGE_INTERVAL_DATA {
19115    #[doc = "0 indicates the interval at which it is sent."]
19116    pub interval_us: i32,
19117    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
19118    pub message_id: u16,
19119}
19120impl MESSAGE_INTERVAL_DATA {
19121    pub const ENCODED_LEN: usize = 6usize;
19122    pub const DEFAULT: Self = Self {
19123        interval_us: 0_i32,
19124        message_id: 0_u16,
19125    };
19126    #[cfg(feature = "arbitrary")]
19127    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19128        use arbitrary::{Arbitrary, Unstructured};
19129        let mut buf = [0u8; 1024];
19130        rng.fill_bytes(&mut buf);
19131        let mut unstructured = Unstructured::new(&buf);
19132        Self::arbitrary(&mut unstructured).unwrap_or_default()
19133    }
19134}
19135impl Default for MESSAGE_INTERVAL_DATA {
19136    fn default() -> Self {
19137        Self::DEFAULT.clone()
19138    }
19139}
19140impl MessageData for MESSAGE_INTERVAL_DATA {
19141    type Message = MavMessage;
19142    const ID: u32 = 244u32;
19143    const NAME: &'static str = "MESSAGE_INTERVAL";
19144    const EXTRA_CRC: u8 = 95u8;
19145    const ENCODED_LEN: usize = 6usize;
19146    fn deser(
19147        _version: MavlinkVersion,
19148        __input: &[u8],
19149    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19150        let avail_len = __input.len();
19151        let mut payload_buf = [0; Self::ENCODED_LEN];
19152        let mut buf = if avail_len < Self::ENCODED_LEN {
19153            payload_buf[0..avail_len].copy_from_slice(__input);
19154            Bytes::new(&payload_buf)
19155        } else {
19156            Bytes::new(__input)
19157        };
19158        let mut __struct = Self::default();
19159        __struct.interval_us = buf.get_i32_le();
19160        __struct.message_id = buf.get_u16_le();
19161        Ok(__struct)
19162    }
19163    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19164        let mut __tmp = BytesMut::new(bytes);
19165        #[allow(clippy::absurd_extreme_comparisons)]
19166        #[allow(unused_comparisons)]
19167        if __tmp.remaining() < Self::ENCODED_LEN {
19168            panic!(
19169                "buffer is too small (need {} bytes, but got {})",
19170                Self::ENCODED_LEN,
19171                __tmp.remaining(),
19172            )
19173        }
19174        __tmp.put_i32_le(self.interval_us);
19175        __tmp.put_u16_le(self.message_id);
19176        if matches!(version, MavlinkVersion::V2) {
19177            let len = __tmp.len();
19178            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19179        } else {
19180            __tmp.len()
19181        }
19182    }
19183}
19184#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
19185#[doc = ""]
19186#[doc = "ID: 47"]
19187#[derive(Debug, Clone, PartialEq)]
19188#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19189#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19190#[cfg_attr(feature = "ts", derive(TS))]
19191#[cfg_attr(feature = "ts", ts(export))]
19192pub struct MISSION_ACK_DATA {
19193    #[doc = "System ID"]
19194    pub target_system: u8,
19195    #[doc = "Component ID"]
19196    pub target_component: u8,
19197    #[doc = "Mission result."]
19198    pub mavtype: MavMissionResult,
19199    #[doc = "Mission type."]
19200    #[cfg_attr(feature = "serde", serde(default))]
19201    pub mission_type: MavMissionType,
19202    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
19203    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19204    pub opaque_id: u32,
19205}
19206impl MISSION_ACK_DATA {
19207    pub const ENCODED_LEN: usize = 8usize;
19208    pub const DEFAULT: Self = Self {
19209        target_system: 0_u8,
19210        target_component: 0_u8,
19211        mavtype: MavMissionResult::DEFAULT,
19212        mission_type: MavMissionType::DEFAULT,
19213        opaque_id: 0_u32,
19214    };
19215    #[cfg(feature = "arbitrary")]
19216    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19217        use arbitrary::{Arbitrary, Unstructured};
19218        let mut buf = [0u8; 1024];
19219        rng.fill_bytes(&mut buf);
19220        let mut unstructured = Unstructured::new(&buf);
19221        Self::arbitrary(&mut unstructured).unwrap_or_default()
19222    }
19223}
19224impl Default for MISSION_ACK_DATA {
19225    fn default() -> Self {
19226        Self::DEFAULT.clone()
19227    }
19228}
19229impl MessageData for MISSION_ACK_DATA {
19230    type Message = MavMessage;
19231    const ID: u32 = 47u32;
19232    const NAME: &'static str = "MISSION_ACK";
19233    const EXTRA_CRC: u8 = 153u8;
19234    const ENCODED_LEN: usize = 8usize;
19235    fn deser(
19236        _version: MavlinkVersion,
19237        __input: &[u8],
19238    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19239        let avail_len = __input.len();
19240        let mut payload_buf = [0; Self::ENCODED_LEN];
19241        let mut buf = if avail_len < Self::ENCODED_LEN {
19242            payload_buf[0..avail_len].copy_from_slice(__input);
19243            Bytes::new(&payload_buf)
19244        } else {
19245            Bytes::new(__input)
19246        };
19247        let mut __struct = Self::default();
19248        __struct.target_system = buf.get_u8();
19249        __struct.target_component = buf.get_u8();
19250        let tmp = buf.get_u8();
19251        __struct.mavtype =
19252            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19253                enum_type: "MavMissionResult",
19254                value: tmp as u32,
19255            })?;
19256        let tmp = buf.get_u8();
19257        __struct.mission_type =
19258            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19259                enum_type: "MavMissionType",
19260                value: tmp as u32,
19261            })?;
19262        __struct.opaque_id = buf.get_u32_le();
19263        Ok(__struct)
19264    }
19265    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19266        let mut __tmp = BytesMut::new(bytes);
19267        #[allow(clippy::absurd_extreme_comparisons)]
19268        #[allow(unused_comparisons)]
19269        if __tmp.remaining() < Self::ENCODED_LEN {
19270            panic!(
19271                "buffer is too small (need {} bytes, but got {})",
19272                Self::ENCODED_LEN,
19273                __tmp.remaining(),
19274            )
19275        }
19276        __tmp.put_u8(self.target_system);
19277        __tmp.put_u8(self.target_component);
19278        __tmp.put_u8(self.mavtype as u8);
19279        if matches!(version, MavlinkVersion::V2) {
19280            __tmp.put_u8(self.mission_type as u8);
19281            __tmp.put_u32_le(self.opaque_id);
19282            let len = __tmp.len();
19283            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19284        } else {
19285            __tmp.len()
19286        }
19287    }
19288}
19289#[doc = "Delete all mission items at once."]
19290#[doc = ""]
19291#[doc = "ID: 45"]
19292#[derive(Debug, Clone, PartialEq)]
19293#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19294#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19295#[cfg_attr(feature = "ts", derive(TS))]
19296#[cfg_attr(feature = "ts", ts(export))]
19297pub struct MISSION_CLEAR_ALL_DATA {
19298    #[doc = "System ID"]
19299    pub target_system: u8,
19300    #[doc = "Component ID"]
19301    pub target_component: u8,
19302    #[doc = "Mission type."]
19303    #[cfg_attr(feature = "serde", serde(default))]
19304    pub mission_type: MavMissionType,
19305}
19306impl MISSION_CLEAR_ALL_DATA {
19307    pub const ENCODED_LEN: usize = 3usize;
19308    pub const DEFAULT: Self = Self {
19309        target_system: 0_u8,
19310        target_component: 0_u8,
19311        mission_type: MavMissionType::DEFAULT,
19312    };
19313    #[cfg(feature = "arbitrary")]
19314    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19315        use arbitrary::{Arbitrary, Unstructured};
19316        let mut buf = [0u8; 1024];
19317        rng.fill_bytes(&mut buf);
19318        let mut unstructured = Unstructured::new(&buf);
19319        Self::arbitrary(&mut unstructured).unwrap_or_default()
19320    }
19321}
19322impl Default for MISSION_CLEAR_ALL_DATA {
19323    fn default() -> Self {
19324        Self::DEFAULT.clone()
19325    }
19326}
19327impl MessageData for MISSION_CLEAR_ALL_DATA {
19328    type Message = MavMessage;
19329    const ID: u32 = 45u32;
19330    const NAME: &'static str = "MISSION_CLEAR_ALL";
19331    const EXTRA_CRC: u8 = 232u8;
19332    const ENCODED_LEN: usize = 3usize;
19333    fn deser(
19334        _version: MavlinkVersion,
19335        __input: &[u8],
19336    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19337        let avail_len = __input.len();
19338        let mut payload_buf = [0; Self::ENCODED_LEN];
19339        let mut buf = if avail_len < Self::ENCODED_LEN {
19340            payload_buf[0..avail_len].copy_from_slice(__input);
19341            Bytes::new(&payload_buf)
19342        } else {
19343            Bytes::new(__input)
19344        };
19345        let mut __struct = Self::default();
19346        __struct.target_system = buf.get_u8();
19347        __struct.target_component = buf.get_u8();
19348        let tmp = buf.get_u8();
19349        __struct.mission_type =
19350            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19351                enum_type: "MavMissionType",
19352                value: tmp as u32,
19353            })?;
19354        Ok(__struct)
19355    }
19356    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19357        let mut __tmp = BytesMut::new(bytes);
19358        #[allow(clippy::absurd_extreme_comparisons)]
19359        #[allow(unused_comparisons)]
19360        if __tmp.remaining() < Self::ENCODED_LEN {
19361            panic!(
19362                "buffer is too small (need {} bytes, but got {})",
19363                Self::ENCODED_LEN,
19364                __tmp.remaining(),
19365            )
19366        }
19367        __tmp.put_u8(self.target_system);
19368        __tmp.put_u8(self.target_component);
19369        if matches!(version, MavlinkVersion::V2) {
19370            __tmp.put_u8(self.mission_type as u8);
19371            let len = __tmp.len();
19372            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19373        } else {
19374            __tmp.len()
19375        }
19376    }
19377}
19378#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
19379#[doc = ""]
19380#[doc = "ID: 44"]
19381#[derive(Debug, Clone, PartialEq)]
19382#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19383#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19384#[cfg_attr(feature = "ts", derive(TS))]
19385#[cfg_attr(feature = "ts", ts(export))]
19386pub struct MISSION_COUNT_DATA {
19387    #[doc = "Number of mission items in the sequence"]
19388    pub count: u16,
19389    #[doc = "System ID"]
19390    pub target_system: u8,
19391    #[doc = "Component ID"]
19392    pub target_component: u8,
19393    #[doc = "Mission type."]
19394    #[cfg_attr(feature = "serde", serde(default))]
19395    pub mission_type: MavMissionType,
19396    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
19397    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19398    pub opaque_id: u32,
19399}
19400impl MISSION_COUNT_DATA {
19401    pub const ENCODED_LEN: usize = 9usize;
19402    pub const DEFAULT: Self = Self {
19403        count: 0_u16,
19404        target_system: 0_u8,
19405        target_component: 0_u8,
19406        mission_type: MavMissionType::DEFAULT,
19407        opaque_id: 0_u32,
19408    };
19409    #[cfg(feature = "arbitrary")]
19410    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19411        use arbitrary::{Arbitrary, Unstructured};
19412        let mut buf = [0u8; 1024];
19413        rng.fill_bytes(&mut buf);
19414        let mut unstructured = Unstructured::new(&buf);
19415        Self::arbitrary(&mut unstructured).unwrap_or_default()
19416    }
19417}
19418impl Default for MISSION_COUNT_DATA {
19419    fn default() -> Self {
19420        Self::DEFAULT.clone()
19421    }
19422}
19423impl MessageData for MISSION_COUNT_DATA {
19424    type Message = MavMessage;
19425    const ID: u32 = 44u32;
19426    const NAME: &'static str = "MISSION_COUNT";
19427    const EXTRA_CRC: u8 = 221u8;
19428    const ENCODED_LEN: usize = 9usize;
19429    fn deser(
19430        _version: MavlinkVersion,
19431        __input: &[u8],
19432    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19433        let avail_len = __input.len();
19434        let mut payload_buf = [0; Self::ENCODED_LEN];
19435        let mut buf = if avail_len < Self::ENCODED_LEN {
19436            payload_buf[0..avail_len].copy_from_slice(__input);
19437            Bytes::new(&payload_buf)
19438        } else {
19439            Bytes::new(__input)
19440        };
19441        let mut __struct = Self::default();
19442        __struct.count = buf.get_u16_le();
19443        __struct.target_system = buf.get_u8();
19444        __struct.target_component = buf.get_u8();
19445        let tmp = buf.get_u8();
19446        __struct.mission_type =
19447            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19448                enum_type: "MavMissionType",
19449                value: tmp as u32,
19450            })?;
19451        __struct.opaque_id = buf.get_u32_le();
19452        Ok(__struct)
19453    }
19454    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19455        let mut __tmp = BytesMut::new(bytes);
19456        #[allow(clippy::absurd_extreme_comparisons)]
19457        #[allow(unused_comparisons)]
19458        if __tmp.remaining() < Self::ENCODED_LEN {
19459            panic!(
19460                "buffer is too small (need {} bytes, but got {})",
19461                Self::ENCODED_LEN,
19462                __tmp.remaining(),
19463            )
19464        }
19465        __tmp.put_u16_le(self.count);
19466        __tmp.put_u8(self.target_system);
19467        __tmp.put_u8(self.target_component);
19468        if matches!(version, MavlinkVersion::V2) {
19469            __tmp.put_u8(self.mission_type as u8);
19470            __tmp.put_u32_le(self.opaque_id);
19471            let len = __tmp.len();
19472            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19473        } else {
19474            __tmp.len()
19475        }
19476    }
19477}
19478#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
19479#[doc = ""]
19480#[doc = "ID: 42"]
19481#[derive(Debug, Clone, PartialEq)]
19482#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19483#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19484#[cfg_attr(feature = "ts", derive(TS))]
19485#[cfg_attr(feature = "ts", ts(export))]
19486pub struct MISSION_CURRENT_DATA {
19487    #[doc = "Sequence"]
19488    pub seq: u16,
19489    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
19490    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19491    pub total: u16,
19492    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
19493    #[cfg_attr(feature = "serde", serde(default))]
19494    pub mission_state: MissionState,
19495    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
19496    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19497    pub mission_mode: u8,
19498    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
19499    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19500    pub mission_id: u32,
19501    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
19502    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19503    pub fence_id: u32,
19504    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
19505    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19506    pub rally_points_id: u32,
19507}
19508impl MISSION_CURRENT_DATA {
19509    pub const ENCODED_LEN: usize = 18usize;
19510    pub const DEFAULT: Self = Self {
19511        seq: 0_u16,
19512        total: 0_u16,
19513        mission_state: MissionState::DEFAULT,
19514        mission_mode: 0_u8,
19515        mission_id: 0_u32,
19516        fence_id: 0_u32,
19517        rally_points_id: 0_u32,
19518    };
19519    #[cfg(feature = "arbitrary")]
19520    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19521        use arbitrary::{Arbitrary, Unstructured};
19522        let mut buf = [0u8; 1024];
19523        rng.fill_bytes(&mut buf);
19524        let mut unstructured = Unstructured::new(&buf);
19525        Self::arbitrary(&mut unstructured).unwrap_or_default()
19526    }
19527}
19528impl Default for MISSION_CURRENT_DATA {
19529    fn default() -> Self {
19530        Self::DEFAULT.clone()
19531    }
19532}
19533impl MessageData for MISSION_CURRENT_DATA {
19534    type Message = MavMessage;
19535    const ID: u32 = 42u32;
19536    const NAME: &'static str = "MISSION_CURRENT";
19537    const EXTRA_CRC: u8 = 28u8;
19538    const ENCODED_LEN: usize = 18usize;
19539    fn deser(
19540        _version: MavlinkVersion,
19541        __input: &[u8],
19542    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19543        let avail_len = __input.len();
19544        let mut payload_buf = [0; Self::ENCODED_LEN];
19545        let mut buf = if avail_len < Self::ENCODED_LEN {
19546            payload_buf[0..avail_len].copy_from_slice(__input);
19547            Bytes::new(&payload_buf)
19548        } else {
19549            Bytes::new(__input)
19550        };
19551        let mut __struct = Self::default();
19552        __struct.seq = buf.get_u16_le();
19553        __struct.total = buf.get_u16_le();
19554        let tmp = buf.get_u8();
19555        __struct.mission_state =
19556            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19557                enum_type: "MissionState",
19558                value: tmp as u32,
19559            })?;
19560        __struct.mission_mode = buf.get_u8();
19561        __struct.mission_id = buf.get_u32_le();
19562        __struct.fence_id = buf.get_u32_le();
19563        __struct.rally_points_id = buf.get_u32_le();
19564        Ok(__struct)
19565    }
19566    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19567        let mut __tmp = BytesMut::new(bytes);
19568        #[allow(clippy::absurd_extreme_comparisons)]
19569        #[allow(unused_comparisons)]
19570        if __tmp.remaining() < Self::ENCODED_LEN {
19571            panic!(
19572                "buffer is too small (need {} bytes, but got {})",
19573                Self::ENCODED_LEN,
19574                __tmp.remaining(),
19575            )
19576        }
19577        __tmp.put_u16_le(self.seq);
19578        if matches!(version, MavlinkVersion::V2) {
19579            __tmp.put_u16_le(self.total);
19580            __tmp.put_u8(self.mission_state as u8);
19581            __tmp.put_u8(self.mission_mode);
19582            __tmp.put_u32_le(self.mission_id);
19583            __tmp.put_u32_le(self.fence_id);
19584            __tmp.put_u32_le(self.rally_points_id);
19585            let len = __tmp.len();
19586            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19587        } else {
19588            __tmp.len()
19589        }
19590    }
19591}
19592#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
19593#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19594#[doc = ""]
19595#[doc = "ID: 39"]
19596#[derive(Debug, Clone, PartialEq)]
19597#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19598#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19599#[cfg_attr(feature = "ts", derive(TS))]
19600#[cfg_attr(feature = "ts", ts(export))]
19601pub struct MISSION_ITEM_DATA {
19602    #[doc = "PARAM1, see MAV_CMD enum"]
19603    pub param1: f32,
19604    #[doc = "PARAM2, see MAV_CMD enum"]
19605    pub param2: f32,
19606    #[doc = "PARAM3, see MAV_CMD enum"]
19607    pub param3: f32,
19608    #[doc = "PARAM4, see MAV_CMD enum"]
19609    pub param4: f32,
19610    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
19611    pub x: f32,
19612    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
19613    pub y: f32,
19614    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
19615    pub z: f32,
19616    #[doc = "Sequence"]
19617    pub seq: u16,
19618    #[doc = "The scheduled action for the waypoint."]
19619    pub command: MavCmd,
19620    #[doc = "System ID"]
19621    pub target_system: u8,
19622    #[doc = "Component ID"]
19623    pub target_component: u8,
19624    #[doc = "The coordinate system of the waypoint."]
19625    pub frame: MavFrame,
19626    #[doc = "false:0, true:1"]
19627    pub current: u8,
19628    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19629    pub autocontinue: u8,
19630    #[doc = "Mission type."]
19631    #[cfg_attr(feature = "serde", serde(default))]
19632    pub mission_type: MavMissionType,
19633}
19634impl MISSION_ITEM_DATA {
19635    pub const ENCODED_LEN: usize = 38usize;
19636    pub const DEFAULT: Self = Self {
19637        param1: 0.0_f32,
19638        param2: 0.0_f32,
19639        param3: 0.0_f32,
19640        param4: 0.0_f32,
19641        x: 0.0_f32,
19642        y: 0.0_f32,
19643        z: 0.0_f32,
19644        seq: 0_u16,
19645        command: MavCmd::DEFAULT,
19646        target_system: 0_u8,
19647        target_component: 0_u8,
19648        frame: MavFrame::DEFAULT,
19649        current: 0_u8,
19650        autocontinue: 0_u8,
19651        mission_type: MavMissionType::DEFAULT,
19652    };
19653    #[cfg(feature = "arbitrary")]
19654    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19655        use arbitrary::{Arbitrary, Unstructured};
19656        let mut buf = [0u8; 1024];
19657        rng.fill_bytes(&mut buf);
19658        let mut unstructured = Unstructured::new(&buf);
19659        Self::arbitrary(&mut unstructured).unwrap_or_default()
19660    }
19661}
19662impl Default for MISSION_ITEM_DATA {
19663    fn default() -> Self {
19664        Self::DEFAULT.clone()
19665    }
19666}
19667impl MessageData for MISSION_ITEM_DATA {
19668    type Message = MavMessage;
19669    const ID: u32 = 39u32;
19670    const NAME: &'static str = "MISSION_ITEM";
19671    const EXTRA_CRC: u8 = 254u8;
19672    const ENCODED_LEN: usize = 38usize;
19673    fn deser(
19674        _version: MavlinkVersion,
19675        __input: &[u8],
19676    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19677        let avail_len = __input.len();
19678        let mut payload_buf = [0; Self::ENCODED_LEN];
19679        let mut buf = if avail_len < Self::ENCODED_LEN {
19680            payload_buf[0..avail_len].copy_from_slice(__input);
19681            Bytes::new(&payload_buf)
19682        } else {
19683            Bytes::new(__input)
19684        };
19685        let mut __struct = Self::default();
19686        __struct.param1 = buf.get_f32_le();
19687        __struct.param2 = buf.get_f32_le();
19688        __struct.param3 = buf.get_f32_le();
19689        __struct.param4 = buf.get_f32_le();
19690        __struct.x = buf.get_f32_le();
19691        __struct.y = buf.get_f32_le();
19692        __struct.z = buf.get_f32_le();
19693        __struct.seq = buf.get_u16_le();
19694        let tmp = buf.get_u16_le();
19695        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19696            ::mavlink_core::error::ParserError::InvalidEnum {
19697                enum_type: "MavCmd",
19698                value: tmp as u32,
19699            },
19700        )?;
19701        __struct.target_system = buf.get_u8();
19702        __struct.target_component = buf.get_u8();
19703        let tmp = buf.get_u8();
19704        __struct.frame =
19705            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19706                enum_type: "MavFrame",
19707                value: tmp as u32,
19708            })?;
19709        __struct.current = buf.get_u8();
19710        __struct.autocontinue = buf.get_u8();
19711        let tmp = buf.get_u8();
19712        __struct.mission_type =
19713            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19714                enum_type: "MavMissionType",
19715                value: tmp as u32,
19716            })?;
19717        Ok(__struct)
19718    }
19719    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19720        let mut __tmp = BytesMut::new(bytes);
19721        #[allow(clippy::absurd_extreme_comparisons)]
19722        #[allow(unused_comparisons)]
19723        if __tmp.remaining() < Self::ENCODED_LEN {
19724            panic!(
19725                "buffer is too small (need {} bytes, but got {})",
19726                Self::ENCODED_LEN,
19727                __tmp.remaining(),
19728            )
19729        }
19730        __tmp.put_f32_le(self.param1);
19731        __tmp.put_f32_le(self.param2);
19732        __tmp.put_f32_le(self.param3);
19733        __tmp.put_f32_le(self.param4);
19734        __tmp.put_f32_le(self.x);
19735        __tmp.put_f32_le(self.y);
19736        __tmp.put_f32_le(self.z);
19737        __tmp.put_u16_le(self.seq);
19738        __tmp.put_u16_le(self.command as u16);
19739        __tmp.put_u8(self.target_system);
19740        __tmp.put_u8(self.target_component);
19741        __tmp.put_u8(self.frame as u8);
19742        __tmp.put_u8(self.current);
19743        __tmp.put_u8(self.autocontinue);
19744        if matches!(version, MavlinkVersion::V2) {
19745            __tmp.put_u8(self.mission_type as u8);
19746            let len = __tmp.len();
19747            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19748        } else {
19749            __tmp.len()
19750        }
19751    }
19752}
19753#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19754#[doc = ""]
19755#[doc = "ID: 73"]
19756#[derive(Debug, Clone, PartialEq)]
19757#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19758#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19759#[cfg_attr(feature = "ts", derive(TS))]
19760#[cfg_attr(feature = "ts", ts(export))]
19761pub struct MISSION_ITEM_INT_DATA {
19762    #[doc = "PARAM1, see MAV_CMD enum"]
19763    pub param1: f32,
19764    #[doc = "PARAM2, see MAV_CMD enum"]
19765    pub param2: f32,
19766    #[doc = "PARAM3, see MAV_CMD enum"]
19767    pub param3: f32,
19768    #[doc = "PARAM4, see MAV_CMD enum"]
19769    pub param4: f32,
19770    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
19771    pub x: i32,
19772    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
19773    pub y: i32,
19774    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
19775    pub z: f32,
19776    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
19777    pub seq: u16,
19778    #[doc = "The scheduled action for the waypoint."]
19779    pub command: MavCmd,
19780    #[doc = "System ID"]
19781    pub target_system: u8,
19782    #[doc = "Component ID"]
19783    pub target_component: u8,
19784    #[doc = "The coordinate system of the waypoint."]
19785    pub frame: MavFrame,
19786    #[doc = "false:0, true:1"]
19787    pub current: u8,
19788    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19789    pub autocontinue: u8,
19790    #[doc = "Mission type."]
19791    #[cfg_attr(feature = "serde", serde(default))]
19792    pub mission_type: MavMissionType,
19793}
19794impl MISSION_ITEM_INT_DATA {
19795    pub const ENCODED_LEN: usize = 38usize;
19796    pub const DEFAULT: Self = Self {
19797        param1: 0.0_f32,
19798        param2: 0.0_f32,
19799        param3: 0.0_f32,
19800        param4: 0.0_f32,
19801        x: 0_i32,
19802        y: 0_i32,
19803        z: 0.0_f32,
19804        seq: 0_u16,
19805        command: MavCmd::DEFAULT,
19806        target_system: 0_u8,
19807        target_component: 0_u8,
19808        frame: MavFrame::DEFAULT,
19809        current: 0_u8,
19810        autocontinue: 0_u8,
19811        mission_type: MavMissionType::DEFAULT,
19812    };
19813    #[cfg(feature = "arbitrary")]
19814    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19815        use arbitrary::{Arbitrary, Unstructured};
19816        let mut buf = [0u8; 1024];
19817        rng.fill_bytes(&mut buf);
19818        let mut unstructured = Unstructured::new(&buf);
19819        Self::arbitrary(&mut unstructured).unwrap_or_default()
19820    }
19821}
19822impl Default for MISSION_ITEM_INT_DATA {
19823    fn default() -> Self {
19824        Self::DEFAULT.clone()
19825    }
19826}
19827impl MessageData for MISSION_ITEM_INT_DATA {
19828    type Message = MavMessage;
19829    const ID: u32 = 73u32;
19830    const NAME: &'static str = "MISSION_ITEM_INT";
19831    const EXTRA_CRC: u8 = 38u8;
19832    const ENCODED_LEN: usize = 38usize;
19833    fn deser(
19834        _version: MavlinkVersion,
19835        __input: &[u8],
19836    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19837        let avail_len = __input.len();
19838        let mut payload_buf = [0; Self::ENCODED_LEN];
19839        let mut buf = if avail_len < Self::ENCODED_LEN {
19840            payload_buf[0..avail_len].copy_from_slice(__input);
19841            Bytes::new(&payload_buf)
19842        } else {
19843            Bytes::new(__input)
19844        };
19845        let mut __struct = Self::default();
19846        __struct.param1 = buf.get_f32_le();
19847        __struct.param2 = buf.get_f32_le();
19848        __struct.param3 = buf.get_f32_le();
19849        __struct.param4 = buf.get_f32_le();
19850        __struct.x = buf.get_i32_le();
19851        __struct.y = buf.get_i32_le();
19852        __struct.z = buf.get_f32_le();
19853        __struct.seq = buf.get_u16_le();
19854        let tmp = buf.get_u16_le();
19855        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19856            ::mavlink_core::error::ParserError::InvalidEnum {
19857                enum_type: "MavCmd",
19858                value: tmp as u32,
19859            },
19860        )?;
19861        __struct.target_system = buf.get_u8();
19862        __struct.target_component = buf.get_u8();
19863        let tmp = buf.get_u8();
19864        __struct.frame =
19865            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19866                enum_type: "MavFrame",
19867                value: tmp as u32,
19868            })?;
19869        __struct.current = buf.get_u8();
19870        __struct.autocontinue = buf.get_u8();
19871        let tmp = buf.get_u8();
19872        __struct.mission_type =
19873            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19874                enum_type: "MavMissionType",
19875                value: tmp as u32,
19876            })?;
19877        Ok(__struct)
19878    }
19879    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19880        let mut __tmp = BytesMut::new(bytes);
19881        #[allow(clippy::absurd_extreme_comparisons)]
19882        #[allow(unused_comparisons)]
19883        if __tmp.remaining() < Self::ENCODED_LEN {
19884            panic!(
19885                "buffer is too small (need {} bytes, but got {})",
19886                Self::ENCODED_LEN,
19887                __tmp.remaining(),
19888            )
19889        }
19890        __tmp.put_f32_le(self.param1);
19891        __tmp.put_f32_le(self.param2);
19892        __tmp.put_f32_le(self.param3);
19893        __tmp.put_f32_le(self.param4);
19894        __tmp.put_i32_le(self.x);
19895        __tmp.put_i32_le(self.y);
19896        __tmp.put_f32_le(self.z);
19897        __tmp.put_u16_le(self.seq);
19898        __tmp.put_u16_le(self.command as u16);
19899        __tmp.put_u8(self.target_system);
19900        __tmp.put_u8(self.target_component);
19901        __tmp.put_u8(self.frame as u8);
19902        __tmp.put_u8(self.current);
19903        __tmp.put_u8(self.autocontinue);
19904        if matches!(version, MavlinkVersion::V2) {
19905            __tmp.put_u8(self.mission_type as u8);
19906            let len = __tmp.len();
19907            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19908        } else {
19909            __tmp.len()
19910        }
19911    }
19912}
19913#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
19914#[doc = ""]
19915#[doc = "ID: 46"]
19916#[derive(Debug, Clone, PartialEq)]
19917#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19918#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19919#[cfg_attr(feature = "ts", derive(TS))]
19920#[cfg_attr(feature = "ts", ts(export))]
19921pub struct MISSION_ITEM_REACHED_DATA {
19922    #[doc = "Sequence"]
19923    pub seq: u16,
19924}
19925impl MISSION_ITEM_REACHED_DATA {
19926    pub const ENCODED_LEN: usize = 2usize;
19927    pub const DEFAULT: Self = Self { seq: 0_u16 };
19928    #[cfg(feature = "arbitrary")]
19929    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19930        use arbitrary::{Arbitrary, Unstructured};
19931        let mut buf = [0u8; 1024];
19932        rng.fill_bytes(&mut buf);
19933        let mut unstructured = Unstructured::new(&buf);
19934        Self::arbitrary(&mut unstructured).unwrap_or_default()
19935    }
19936}
19937impl Default for MISSION_ITEM_REACHED_DATA {
19938    fn default() -> Self {
19939        Self::DEFAULT.clone()
19940    }
19941}
19942impl MessageData for MISSION_ITEM_REACHED_DATA {
19943    type Message = MavMessage;
19944    const ID: u32 = 46u32;
19945    const NAME: &'static str = "MISSION_ITEM_REACHED";
19946    const EXTRA_CRC: u8 = 11u8;
19947    const ENCODED_LEN: usize = 2usize;
19948    fn deser(
19949        _version: MavlinkVersion,
19950        __input: &[u8],
19951    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19952        let avail_len = __input.len();
19953        let mut payload_buf = [0; Self::ENCODED_LEN];
19954        let mut buf = if avail_len < Self::ENCODED_LEN {
19955            payload_buf[0..avail_len].copy_from_slice(__input);
19956            Bytes::new(&payload_buf)
19957        } else {
19958            Bytes::new(__input)
19959        };
19960        let mut __struct = Self::default();
19961        __struct.seq = buf.get_u16_le();
19962        Ok(__struct)
19963    }
19964    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19965        let mut __tmp = BytesMut::new(bytes);
19966        #[allow(clippy::absurd_extreme_comparisons)]
19967        #[allow(unused_comparisons)]
19968        if __tmp.remaining() < Self::ENCODED_LEN {
19969            panic!(
19970                "buffer is too small (need {} bytes, but got {})",
19971                Self::ENCODED_LEN,
19972                __tmp.remaining(),
19973            )
19974        }
19975        __tmp.put_u16_le(self.seq);
19976        if matches!(version, MavlinkVersion::V2) {
19977            let len = __tmp.len();
19978            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19979        } else {
19980            __tmp.len()
19981        }
19982    }
19983}
19984#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
19985#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
19986#[doc = ""]
19987#[doc = "ID: 40"]
19988#[derive(Debug, Clone, PartialEq)]
19989#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19990#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19991#[cfg_attr(feature = "ts", derive(TS))]
19992#[cfg_attr(feature = "ts", ts(export))]
19993pub struct MISSION_REQUEST_DATA {
19994    #[doc = "Sequence"]
19995    pub seq: u16,
19996    #[doc = "System ID"]
19997    pub target_system: u8,
19998    #[doc = "Component ID"]
19999    pub target_component: u8,
20000    #[doc = "Mission type."]
20001    #[cfg_attr(feature = "serde", serde(default))]
20002    pub mission_type: MavMissionType,
20003}
20004impl MISSION_REQUEST_DATA {
20005    pub const ENCODED_LEN: usize = 5usize;
20006    pub const DEFAULT: Self = Self {
20007        seq: 0_u16,
20008        target_system: 0_u8,
20009        target_component: 0_u8,
20010        mission_type: MavMissionType::DEFAULT,
20011    };
20012    #[cfg(feature = "arbitrary")]
20013    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20014        use arbitrary::{Arbitrary, Unstructured};
20015        let mut buf = [0u8; 1024];
20016        rng.fill_bytes(&mut buf);
20017        let mut unstructured = Unstructured::new(&buf);
20018        Self::arbitrary(&mut unstructured).unwrap_or_default()
20019    }
20020}
20021impl Default for MISSION_REQUEST_DATA {
20022    fn default() -> Self {
20023        Self::DEFAULT.clone()
20024    }
20025}
20026impl MessageData for MISSION_REQUEST_DATA {
20027    type Message = MavMessage;
20028    const ID: u32 = 40u32;
20029    const NAME: &'static str = "MISSION_REQUEST";
20030    const EXTRA_CRC: u8 = 230u8;
20031    const ENCODED_LEN: usize = 5usize;
20032    fn deser(
20033        _version: MavlinkVersion,
20034        __input: &[u8],
20035    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20036        let avail_len = __input.len();
20037        let mut payload_buf = [0; Self::ENCODED_LEN];
20038        let mut buf = if avail_len < Self::ENCODED_LEN {
20039            payload_buf[0..avail_len].copy_from_slice(__input);
20040            Bytes::new(&payload_buf)
20041        } else {
20042            Bytes::new(__input)
20043        };
20044        let mut __struct = Self::default();
20045        __struct.seq = buf.get_u16_le();
20046        __struct.target_system = buf.get_u8();
20047        __struct.target_component = buf.get_u8();
20048        let tmp = buf.get_u8();
20049        __struct.mission_type =
20050            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20051                enum_type: "MavMissionType",
20052                value: tmp as u32,
20053            })?;
20054        Ok(__struct)
20055    }
20056    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20057        let mut __tmp = BytesMut::new(bytes);
20058        #[allow(clippy::absurd_extreme_comparisons)]
20059        #[allow(unused_comparisons)]
20060        if __tmp.remaining() < Self::ENCODED_LEN {
20061            panic!(
20062                "buffer is too small (need {} bytes, but got {})",
20063                Self::ENCODED_LEN,
20064                __tmp.remaining(),
20065            )
20066        }
20067        __tmp.put_u16_le(self.seq);
20068        __tmp.put_u8(self.target_system);
20069        __tmp.put_u8(self.target_component);
20070        if matches!(version, MavlinkVersion::V2) {
20071            __tmp.put_u8(self.mission_type as u8);
20072            let len = __tmp.len();
20073            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20074        } else {
20075            __tmp.len()
20076        }
20077    }
20078}
20079#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20080#[doc = ""]
20081#[doc = "ID: 51"]
20082#[derive(Debug, Clone, PartialEq)]
20083#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20084#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20085#[cfg_attr(feature = "ts", derive(TS))]
20086#[cfg_attr(feature = "ts", ts(export))]
20087pub struct MISSION_REQUEST_INT_DATA {
20088    #[doc = "Sequence"]
20089    pub seq: u16,
20090    #[doc = "System ID"]
20091    pub target_system: u8,
20092    #[doc = "Component ID"]
20093    pub target_component: u8,
20094    #[doc = "Mission type."]
20095    #[cfg_attr(feature = "serde", serde(default))]
20096    pub mission_type: MavMissionType,
20097}
20098impl MISSION_REQUEST_INT_DATA {
20099    pub const ENCODED_LEN: usize = 5usize;
20100    pub const DEFAULT: Self = Self {
20101        seq: 0_u16,
20102        target_system: 0_u8,
20103        target_component: 0_u8,
20104        mission_type: MavMissionType::DEFAULT,
20105    };
20106    #[cfg(feature = "arbitrary")]
20107    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20108        use arbitrary::{Arbitrary, Unstructured};
20109        let mut buf = [0u8; 1024];
20110        rng.fill_bytes(&mut buf);
20111        let mut unstructured = Unstructured::new(&buf);
20112        Self::arbitrary(&mut unstructured).unwrap_or_default()
20113    }
20114}
20115impl Default for MISSION_REQUEST_INT_DATA {
20116    fn default() -> Self {
20117        Self::DEFAULT.clone()
20118    }
20119}
20120impl MessageData for MISSION_REQUEST_INT_DATA {
20121    type Message = MavMessage;
20122    const ID: u32 = 51u32;
20123    const NAME: &'static str = "MISSION_REQUEST_INT";
20124    const EXTRA_CRC: u8 = 196u8;
20125    const ENCODED_LEN: usize = 5usize;
20126    fn deser(
20127        _version: MavlinkVersion,
20128        __input: &[u8],
20129    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20130        let avail_len = __input.len();
20131        let mut payload_buf = [0; Self::ENCODED_LEN];
20132        let mut buf = if avail_len < Self::ENCODED_LEN {
20133            payload_buf[0..avail_len].copy_from_slice(__input);
20134            Bytes::new(&payload_buf)
20135        } else {
20136            Bytes::new(__input)
20137        };
20138        let mut __struct = Self::default();
20139        __struct.seq = buf.get_u16_le();
20140        __struct.target_system = buf.get_u8();
20141        __struct.target_component = buf.get_u8();
20142        let tmp = buf.get_u8();
20143        __struct.mission_type =
20144            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20145                enum_type: "MavMissionType",
20146                value: tmp as u32,
20147            })?;
20148        Ok(__struct)
20149    }
20150    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20151        let mut __tmp = BytesMut::new(bytes);
20152        #[allow(clippy::absurd_extreme_comparisons)]
20153        #[allow(unused_comparisons)]
20154        if __tmp.remaining() < Self::ENCODED_LEN {
20155            panic!(
20156                "buffer is too small (need {} bytes, but got {})",
20157                Self::ENCODED_LEN,
20158                __tmp.remaining(),
20159            )
20160        }
20161        __tmp.put_u16_le(self.seq);
20162        __tmp.put_u8(self.target_system);
20163        __tmp.put_u8(self.target_component);
20164        if matches!(version, MavlinkVersion::V2) {
20165            __tmp.put_u8(self.mission_type as u8);
20166            let len = __tmp.len();
20167            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20168        } else {
20169            __tmp.len()
20170        }
20171    }
20172}
20173#[doc = "Request the overall list of mission items from the system/component."]
20174#[doc = ""]
20175#[doc = "ID: 43"]
20176#[derive(Debug, Clone, PartialEq)]
20177#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20178#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20179#[cfg_attr(feature = "ts", derive(TS))]
20180#[cfg_attr(feature = "ts", ts(export))]
20181pub struct MISSION_REQUEST_LIST_DATA {
20182    #[doc = "System ID"]
20183    pub target_system: u8,
20184    #[doc = "Component ID"]
20185    pub target_component: u8,
20186    #[doc = "Mission type."]
20187    #[cfg_attr(feature = "serde", serde(default))]
20188    pub mission_type: MavMissionType,
20189}
20190impl MISSION_REQUEST_LIST_DATA {
20191    pub const ENCODED_LEN: usize = 3usize;
20192    pub const DEFAULT: Self = Self {
20193        target_system: 0_u8,
20194        target_component: 0_u8,
20195        mission_type: MavMissionType::DEFAULT,
20196    };
20197    #[cfg(feature = "arbitrary")]
20198    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20199        use arbitrary::{Arbitrary, Unstructured};
20200        let mut buf = [0u8; 1024];
20201        rng.fill_bytes(&mut buf);
20202        let mut unstructured = Unstructured::new(&buf);
20203        Self::arbitrary(&mut unstructured).unwrap_or_default()
20204    }
20205}
20206impl Default for MISSION_REQUEST_LIST_DATA {
20207    fn default() -> Self {
20208        Self::DEFAULT.clone()
20209    }
20210}
20211impl MessageData for MISSION_REQUEST_LIST_DATA {
20212    type Message = MavMessage;
20213    const ID: u32 = 43u32;
20214    const NAME: &'static str = "MISSION_REQUEST_LIST";
20215    const EXTRA_CRC: u8 = 132u8;
20216    const ENCODED_LEN: usize = 3usize;
20217    fn deser(
20218        _version: MavlinkVersion,
20219        __input: &[u8],
20220    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20221        let avail_len = __input.len();
20222        let mut payload_buf = [0; Self::ENCODED_LEN];
20223        let mut buf = if avail_len < Self::ENCODED_LEN {
20224            payload_buf[0..avail_len].copy_from_slice(__input);
20225            Bytes::new(&payload_buf)
20226        } else {
20227            Bytes::new(__input)
20228        };
20229        let mut __struct = Self::default();
20230        __struct.target_system = buf.get_u8();
20231        __struct.target_component = buf.get_u8();
20232        let tmp = buf.get_u8();
20233        __struct.mission_type =
20234            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20235                enum_type: "MavMissionType",
20236                value: tmp as u32,
20237            })?;
20238        Ok(__struct)
20239    }
20240    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20241        let mut __tmp = BytesMut::new(bytes);
20242        #[allow(clippy::absurd_extreme_comparisons)]
20243        #[allow(unused_comparisons)]
20244        if __tmp.remaining() < Self::ENCODED_LEN {
20245            panic!(
20246                "buffer is too small (need {} bytes, but got {})",
20247                Self::ENCODED_LEN,
20248                __tmp.remaining(),
20249            )
20250        }
20251        __tmp.put_u8(self.target_system);
20252        __tmp.put_u8(self.target_component);
20253        if matches!(version, MavlinkVersion::V2) {
20254            __tmp.put_u8(self.mission_type as u8);
20255            let len = __tmp.len();
20256            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20257        } else {
20258            __tmp.len()
20259        }
20260    }
20261}
20262#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
20263#[doc = ""]
20264#[doc = "ID: 37"]
20265#[derive(Debug, Clone, PartialEq)]
20266#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20267#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20268#[cfg_attr(feature = "ts", derive(TS))]
20269#[cfg_attr(feature = "ts", ts(export))]
20270pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
20271    #[doc = "Start index"]
20272    pub start_index: i16,
20273    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
20274    pub end_index: i16,
20275    #[doc = "System ID"]
20276    pub target_system: u8,
20277    #[doc = "Component ID"]
20278    pub target_component: u8,
20279    #[doc = "Mission type."]
20280    #[cfg_attr(feature = "serde", serde(default))]
20281    pub mission_type: MavMissionType,
20282}
20283impl MISSION_REQUEST_PARTIAL_LIST_DATA {
20284    pub const ENCODED_LEN: usize = 7usize;
20285    pub const DEFAULT: Self = Self {
20286        start_index: 0_i16,
20287        end_index: 0_i16,
20288        target_system: 0_u8,
20289        target_component: 0_u8,
20290        mission_type: MavMissionType::DEFAULT,
20291    };
20292    #[cfg(feature = "arbitrary")]
20293    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20294        use arbitrary::{Arbitrary, Unstructured};
20295        let mut buf = [0u8; 1024];
20296        rng.fill_bytes(&mut buf);
20297        let mut unstructured = Unstructured::new(&buf);
20298        Self::arbitrary(&mut unstructured).unwrap_or_default()
20299    }
20300}
20301impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
20302    fn default() -> Self {
20303        Self::DEFAULT.clone()
20304    }
20305}
20306impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
20307    type Message = MavMessage;
20308    const ID: u32 = 37u32;
20309    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
20310    const EXTRA_CRC: u8 = 212u8;
20311    const ENCODED_LEN: usize = 7usize;
20312    fn deser(
20313        _version: MavlinkVersion,
20314        __input: &[u8],
20315    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20316        let avail_len = __input.len();
20317        let mut payload_buf = [0; Self::ENCODED_LEN];
20318        let mut buf = if avail_len < Self::ENCODED_LEN {
20319            payload_buf[0..avail_len].copy_from_slice(__input);
20320            Bytes::new(&payload_buf)
20321        } else {
20322            Bytes::new(__input)
20323        };
20324        let mut __struct = Self::default();
20325        __struct.start_index = buf.get_i16_le();
20326        __struct.end_index = buf.get_i16_le();
20327        __struct.target_system = buf.get_u8();
20328        __struct.target_component = buf.get_u8();
20329        let tmp = buf.get_u8();
20330        __struct.mission_type =
20331            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20332                enum_type: "MavMissionType",
20333                value: tmp as u32,
20334            })?;
20335        Ok(__struct)
20336    }
20337    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20338        let mut __tmp = BytesMut::new(bytes);
20339        #[allow(clippy::absurd_extreme_comparisons)]
20340        #[allow(unused_comparisons)]
20341        if __tmp.remaining() < Self::ENCODED_LEN {
20342            panic!(
20343                "buffer is too small (need {} bytes, but got {})",
20344                Self::ENCODED_LEN,
20345                __tmp.remaining(),
20346            )
20347        }
20348        __tmp.put_i16_le(self.start_index);
20349        __tmp.put_i16_le(self.end_index);
20350        __tmp.put_u8(self.target_system);
20351        __tmp.put_u8(self.target_component);
20352        if matches!(version, MavlinkVersion::V2) {
20353            __tmp.put_u8(self.mission_type as u8);
20354            let len = __tmp.len();
20355            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20356        } else {
20357            __tmp.len()
20358        }
20359    }
20360}
20361#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
20362#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
20363#[doc = ""]
20364#[doc = "ID: 41"]
20365#[derive(Debug, Clone, PartialEq)]
20366#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20368#[cfg_attr(feature = "ts", derive(TS))]
20369#[cfg_attr(feature = "ts", ts(export))]
20370pub struct MISSION_SET_CURRENT_DATA {
20371    #[doc = "Sequence"]
20372    pub seq: u16,
20373    #[doc = "System ID"]
20374    pub target_system: u8,
20375    #[doc = "Component ID"]
20376    pub target_component: u8,
20377}
20378impl MISSION_SET_CURRENT_DATA {
20379    pub const ENCODED_LEN: usize = 4usize;
20380    pub const DEFAULT: Self = Self {
20381        seq: 0_u16,
20382        target_system: 0_u8,
20383        target_component: 0_u8,
20384    };
20385    #[cfg(feature = "arbitrary")]
20386    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20387        use arbitrary::{Arbitrary, Unstructured};
20388        let mut buf = [0u8; 1024];
20389        rng.fill_bytes(&mut buf);
20390        let mut unstructured = Unstructured::new(&buf);
20391        Self::arbitrary(&mut unstructured).unwrap_or_default()
20392    }
20393}
20394impl Default for MISSION_SET_CURRENT_DATA {
20395    fn default() -> Self {
20396        Self::DEFAULT.clone()
20397    }
20398}
20399impl MessageData for MISSION_SET_CURRENT_DATA {
20400    type Message = MavMessage;
20401    const ID: u32 = 41u32;
20402    const NAME: &'static str = "MISSION_SET_CURRENT";
20403    const EXTRA_CRC: u8 = 28u8;
20404    const ENCODED_LEN: usize = 4usize;
20405    fn deser(
20406        _version: MavlinkVersion,
20407        __input: &[u8],
20408    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20409        let avail_len = __input.len();
20410        let mut payload_buf = [0; Self::ENCODED_LEN];
20411        let mut buf = if avail_len < Self::ENCODED_LEN {
20412            payload_buf[0..avail_len].copy_from_slice(__input);
20413            Bytes::new(&payload_buf)
20414        } else {
20415            Bytes::new(__input)
20416        };
20417        let mut __struct = Self::default();
20418        __struct.seq = buf.get_u16_le();
20419        __struct.target_system = buf.get_u8();
20420        __struct.target_component = buf.get_u8();
20421        Ok(__struct)
20422    }
20423    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20424        let mut __tmp = BytesMut::new(bytes);
20425        #[allow(clippy::absurd_extreme_comparisons)]
20426        #[allow(unused_comparisons)]
20427        if __tmp.remaining() < Self::ENCODED_LEN {
20428            panic!(
20429                "buffer is too small (need {} bytes, but got {})",
20430                Self::ENCODED_LEN,
20431                __tmp.remaining(),
20432            )
20433        }
20434        __tmp.put_u16_le(self.seq);
20435        __tmp.put_u8(self.target_system);
20436        __tmp.put_u8(self.target_component);
20437        if matches!(version, MavlinkVersion::V2) {
20438            let len = __tmp.len();
20439            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20440        } else {
20441            __tmp.len()
20442        }
20443    }
20444}
20445#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
20446#[doc = ""]
20447#[doc = "ID: 38"]
20448#[derive(Debug, Clone, PartialEq)]
20449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20450#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20451#[cfg_attr(feature = "ts", derive(TS))]
20452#[cfg_attr(feature = "ts", ts(export))]
20453pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
20454    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
20455    pub start_index: i16,
20456    #[doc = "End index, equal or greater than start index."]
20457    pub end_index: i16,
20458    #[doc = "System ID"]
20459    pub target_system: u8,
20460    #[doc = "Component ID"]
20461    pub target_component: u8,
20462    #[doc = "Mission type."]
20463    #[cfg_attr(feature = "serde", serde(default))]
20464    pub mission_type: MavMissionType,
20465}
20466impl MISSION_WRITE_PARTIAL_LIST_DATA {
20467    pub const ENCODED_LEN: usize = 7usize;
20468    pub const DEFAULT: Self = Self {
20469        start_index: 0_i16,
20470        end_index: 0_i16,
20471        target_system: 0_u8,
20472        target_component: 0_u8,
20473        mission_type: MavMissionType::DEFAULT,
20474    };
20475    #[cfg(feature = "arbitrary")]
20476    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20477        use arbitrary::{Arbitrary, Unstructured};
20478        let mut buf = [0u8; 1024];
20479        rng.fill_bytes(&mut buf);
20480        let mut unstructured = Unstructured::new(&buf);
20481        Self::arbitrary(&mut unstructured).unwrap_or_default()
20482    }
20483}
20484impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
20485    fn default() -> Self {
20486        Self::DEFAULT.clone()
20487    }
20488}
20489impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
20490    type Message = MavMessage;
20491    const ID: u32 = 38u32;
20492    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
20493    const EXTRA_CRC: u8 = 9u8;
20494    const ENCODED_LEN: usize = 7usize;
20495    fn deser(
20496        _version: MavlinkVersion,
20497        __input: &[u8],
20498    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20499        let avail_len = __input.len();
20500        let mut payload_buf = [0; Self::ENCODED_LEN];
20501        let mut buf = if avail_len < Self::ENCODED_LEN {
20502            payload_buf[0..avail_len].copy_from_slice(__input);
20503            Bytes::new(&payload_buf)
20504        } else {
20505            Bytes::new(__input)
20506        };
20507        let mut __struct = Self::default();
20508        __struct.start_index = buf.get_i16_le();
20509        __struct.end_index = buf.get_i16_le();
20510        __struct.target_system = buf.get_u8();
20511        __struct.target_component = buf.get_u8();
20512        let tmp = buf.get_u8();
20513        __struct.mission_type =
20514            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20515                enum_type: "MavMissionType",
20516                value: tmp as u32,
20517            })?;
20518        Ok(__struct)
20519    }
20520    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20521        let mut __tmp = BytesMut::new(bytes);
20522        #[allow(clippy::absurd_extreme_comparisons)]
20523        #[allow(unused_comparisons)]
20524        if __tmp.remaining() < Self::ENCODED_LEN {
20525            panic!(
20526                "buffer is too small (need {} bytes, but got {})",
20527                Self::ENCODED_LEN,
20528                __tmp.remaining(),
20529            )
20530        }
20531        __tmp.put_i16_le(self.start_index);
20532        __tmp.put_i16_le(self.end_index);
20533        __tmp.put_u8(self.target_system);
20534        __tmp.put_u8(self.target_component);
20535        if matches!(version, MavlinkVersion::V2) {
20536            __tmp.put_u8(self.mission_type as u8);
20537            let len = __tmp.len();
20538            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20539        } else {
20540            __tmp.len()
20541        }
20542    }
20543}
20544#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
20545#[doc = "Orientation of a mount."]
20546#[doc = ""]
20547#[doc = "ID: 265"]
20548#[derive(Debug, Clone, PartialEq)]
20549#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20550#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20551#[cfg_attr(feature = "ts", derive(TS))]
20552#[cfg_attr(feature = "ts", ts(export))]
20553pub struct MOUNT_ORIENTATION_DATA {
20554    #[doc = "Timestamp (time since system boot)."]
20555    pub time_boot_ms: u32,
20556    #[doc = "Roll in global frame (set to NaN for invalid)."]
20557    pub roll: f32,
20558    #[doc = "Pitch in global frame (set to NaN for invalid)."]
20559    pub pitch: f32,
20560    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
20561    pub yaw: f32,
20562    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
20563    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20564    pub yaw_absolute: f32,
20565}
20566impl MOUNT_ORIENTATION_DATA {
20567    pub const ENCODED_LEN: usize = 20usize;
20568    pub const DEFAULT: Self = Self {
20569        time_boot_ms: 0_u32,
20570        roll: 0.0_f32,
20571        pitch: 0.0_f32,
20572        yaw: 0.0_f32,
20573        yaw_absolute: 0.0_f32,
20574    };
20575    #[cfg(feature = "arbitrary")]
20576    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20577        use arbitrary::{Arbitrary, Unstructured};
20578        let mut buf = [0u8; 1024];
20579        rng.fill_bytes(&mut buf);
20580        let mut unstructured = Unstructured::new(&buf);
20581        Self::arbitrary(&mut unstructured).unwrap_or_default()
20582    }
20583}
20584impl Default for MOUNT_ORIENTATION_DATA {
20585    fn default() -> Self {
20586        Self::DEFAULT.clone()
20587    }
20588}
20589impl MessageData for MOUNT_ORIENTATION_DATA {
20590    type Message = MavMessage;
20591    const ID: u32 = 265u32;
20592    const NAME: &'static str = "MOUNT_ORIENTATION";
20593    const EXTRA_CRC: u8 = 26u8;
20594    const ENCODED_LEN: usize = 20usize;
20595    fn deser(
20596        _version: MavlinkVersion,
20597        __input: &[u8],
20598    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20599        let avail_len = __input.len();
20600        let mut payload_buf = [0; Self::ENCODED_LEN];
20601        let mut buf = if avail_len < Self::ENCODED_LEN {
20602            payload_buf[0..avail_len].copy_from_slice(__input);
20603            Bytes::new(&payload_buf)
20604        } else {
20605            Bytes::new(__input)
20606        };
20607        let mut __struct = Self::default();
20608        __struct.time_boot_ms = buf.get_u32_le();
20609        __struct.roll = buf.get_f32_le();
20610        __struct.pitch = buf.get_f32_le();
20611        __struct.yaw = buf.get_f32_le();
20612        __struct.yaw_absolute = buf.get_f32_le();
20613        Ok(__struct)
20614    }
20615    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20616        let mut __tmp = BytesMut::new(bytes);
20617        #[allow(clippy::absurd_extreme_comparisons)]
20618        #[allow(unused_comparisons)]
20619        if __tmp.remaining() < Self::ENCODED_LEN {
20620            panic!(
20621                "buffer is too small (need {} bytes, but got {})",
20622                Self::ENCODED_LEN,
20623                __tmp.remaining(),
20624            )
20625        }
20626        __tmp.put_u32_le(self.time_boot_ms);
20627        __tmp.put_f32_le(self.roll);
20628        __tmp.put_f32_le(self.pitch);
20629        __tmp.put_f32_le(self.yaw);
20630        if matches!(version, MavlinkVersion::V2) {
20631            __tmp.put_f32_le(self.yaw_absolute);
20632            let len = __tmp.len();
20633            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20634        } else {
20635            __tmp.len()
20636        }
20637    }
20638}
20639#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20640#[doc = ""]
20641#[doc = "ID: 251"]
20642#[derive(Debug, Clone, PartialEq)]
20643#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20644#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20645#[cfg_attr(feature = "ts", derive(TS))]
20646#[cfg_attr(feature = "ts", ts(export))]
20647pub struct NAMED_VALUE_FLOAT_DATA {
20648    #[doc = "Timestamp (time since system boot)."]
20649    pub time_boot_ms: u32,
20650    #[doc = "Floating point value"]
20651    pub value: f32,
20652    #[doc = "Name of the debug variable"]
20653    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20654    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20655    pub name: [u8; 10],
20656}
20657impl NAMED_VALUE_FLOAT_DATA {
20658    pub const ENCODED_LEN: usize = 18usize;
20659    pub const DEFAULT: Self = Self {
20660        time_boot_ms: 0_u32,
20661        value: 0.0_f32,
20662        name: [0_u8; 10usize],
20663    };
20664    #[cfg(feature = "arbitrary")]
20665    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20666        use arbitrary::{Arbitrary, Unstructured};
20667        let mut buf = [0u8; 1024];
20668        rng.fill_bytes(&mut buf);
20669        let mut unstructured = Unstructured::new(&buf);
20670        Self::arbitrary(&mut unstructured).unwrap_or_default()
20671    }
20672}
20673impl Default for NAMED_VALUE_FLOAT_DATA {
20674    fn default() -> Self {
20675        Self::DEFAULT.clone()
20676    }
20677}
20678impl MessageData for NAMED_VALUE_FLOAT_DATA {
20679    type Message = MavMessage;
20680    const ID: u32 = 251u32;
20681    const NAME: &'static str = "NAMED_VALUE_FLOAT";
20682    const EXTRA_CRC: u8 = 170u8;
20683    const ENCODED_LEN: usize = 18usize;
20684    fn deser(
20685        _version: MavlinkVersion,
20686        __input: &[u8],
20687    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20688        let avail_len = __input.len();
20689        let mut payload_buf = [0; Self::ENCODED_LEN];
20690        let mut buf = if avail_len < Self::ENCODED_LEN {
20691            payload_buf[0..avail_len].copy_from_slice(__input);
20692            Bytes::new(&payload_buf)
20693        } else {
20694            Bytes::new(__input)
20695        };
20696        let mut __struct = Self::default();
20697        __struct.time_boot_ms = buf.get_u32_le();
20698        __struct.value = buf.get_f32_le();
20699        for v in &mut __struct.name {
20700            let val = buf.get_u8();
20701            *v = val;
20702        }
20703        Ok(__struct)
20704    }
20705    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20706        let mut __tmp = BytesMut::new(bytes);
20707        #[allow(clippy::absurd_extreme_comparisons)]
20708        #[allow(unused_comparisons)]
20709        if __tmp.remaining() < Self::ENCODED_LEN {
20710            panic!(
20711                "buffer is too small (need {} bytes, but got {})",
20712                Self::ENCODED_LEN,
20713                __tmp.remaining(),
20714            )
20715        }
20716        __tmp.put_u32_le(self.time_boot_ms);
20717        __tmp.put_f32_le(self.value);
20718        for val in &self.name {
20719            __tmp.put_u8(*val);
20720        }
20721        if matches!(version, MavlinkVersion::V2) {
20722            let len = __tmp.len();
20723            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20724        } else {
20725            __tmp.len()
20726        }
20727    }
20728}
20729#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20730#[doc = ""]
20731#[doc = "ID: 252"]
20732#[derive(Debug, Clone, PartialEq)]
20733#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20734#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20735#[cfg_attr(feature = "ts", derive(TS))]
20736#[cfg_attr(feature = "ts", ts(export))]
20737pub struct NAMED_VALUE_INT_DATA {
20738    #[doc = "Timestamp (time since system boot)."]
20739    pub time_boot_ms: u32,
20740    #[doc = "Signed integer value"]
20741    pub value: i32,
20742    #[doc = "Name of the debug variable"]
20743    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20744    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20745    pub name: [u8; 10],
20746}
20747impl NAMED_VALUE_INT_DATA {
20748    pub const ENCODED_LEN: usize = 18usize;
20749    pub const DEFAULT: Self = Self {
20750        time_boot_ms: 0_u32,
20751        value: 0_i32,
20752        name: [0_u8; 10usize],
20753    };
20754    #[cfg(feature = "arbitrary")]
20755    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20756        use arbitrary::{Arbitrary, Unstructured};
20757        let mut buf = [0u8; 1024];
20758        rng.fill_bytes(&mut buf);
20759        let mut unstructured = Unstructured::new(&buf);
20760        Self::arbitrary(&mut unstructured).unwrap_or_default()
20761    }
20762}
20763impl Default for NAMED_VALUE_INT_DATA {
20764    fn default() -> Self {
20765        Self::DEFAULT.clone()
20766    }
20767}
20768impl MessageData for NAMED_VALUE_INT_DATA {
20769    type Message = MavMessage;
20770    const ID: u32 = 252u32;
20771    const NAME: &'static str = "NAMED_VALUE_INT";
20772    const EXTRA_CRC: u8 = 44u8;
20773    const ENCODED_LEN: usize = 18usize;
20774    fn deser(
20775        _version: MavlinkVersion,
20776        __input: &[u8],
20777    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20778        let avail_len = __input.len();
20779        let mut payload_buf = [0; Self::ENCODED_LEN];
20780        let mut buf = if avail_len < Self::ENCODED_LEN {
20781            payload_buf[0..avail_len].copy_from_slice(__input);
20782            Bytes::new(&payload_buf)
20783        } else {
20784            Bytes::new(__input)
20785        };
20786        let mut __struct = Self::default();
20787        __struct.time_boot_ms = buf.get_u32_le();
20788        __struct.value = buf.get_i32_le();
20789        for v in &mut __struct.name {
20790            let val = buf.get_u8();
20791            *v = val;
20792        }
20793        Ok(__struct)
20794    }
20795    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20796        let mut __tmp = BytesMut::new(bytes);
20797        #[allow(clippy::absurd_extreme_comparisons)]
20798        #[allow(unused_comparisons)]
20799        if __tmp.remaining() < Self::ENCODED_LEN {
20800            panic!(
20801                "buffer is too small (need {} bytes, but got {})",
20802                Self::ENCODED_LEN,
20803                __tmp.remaining(),
20804            )
20805        }
20806        __tmp.put_u32_le(self.time_boot_ms);
20807        __tmp.put_i32_le(self.value);
20808        for val in &self.name {
20809            __tmp.put_u8(*val);
20810        }
20811        if matches!(version, MavlinkVersion::V2) {
20812            let len = __tmp.len();
20813            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20814        } else {
20815            __tmp.len()
20816        }
20817    }
20818}
20819#[doc = "The state of the navigation and position controller."]
20820#[doc = ""]
20821#[doc = "ID: 62"]
20822#[derive(Debug, Clone, PartialEq)]
20823#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20824#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20825#[cfg_attr(feature = "ts", derive(TS))]
20826#[cfg_attr(feature = "ts", ts(export))]
20827pub struct NAV_CONTROLLER_OUTPUT_DATA {
20828    #[doc = "Current desired roll"]
20829    pub nav_roll: f32,
20830    #[doc = "Current desired pitch"]
20831    pub nav_pitch: f32,
20832    #[doc = "Current altitude error"]
20833    pub alt_error: f32,
20834    #[doc = "Current airspeed error"]
20835    pub aspd_error: f32,
20836    #[doc = "Current crosstrack error on x-y plane"]
20837    pub xtrack_error: f32,
20838    #[doc = "Current desired heading"]
20839    pub nav_bearing: i16,
20840    #[doc = "Bearing to current waypoint/target"]
20841    pub target_bearing: i16,
20842    #[doc = "Distance to active waypoint"]
20843    pub wp_dist: u16,
20844}
20845impl NAV_CONTROLLER_OUTPUT_DATA {
20846    pub const ENCODED_LEN: usize = 26usize;
20847    pub const DEFAULT: Self = Self {
20848        nav_roll: 0.0_f32,
20849        nav_pitch: 0.0_f32,
20850        alt_error: 0.0_f32,
20851        aspd_error: 0.0_f32,
20852        xtrack_error: 0.0_f32,
20853        nav_bearing: 0_i16,
20854        target_bearing: 0_i16,
20855        wp_dist: 0_u16,
20856    };
20857    #[cfg(feature = "arbitrary")]
20858    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20859        use arbitrary::{Arbitrary, Unstructured};
20860        let mut buf = [0u8; 1024];
20861        rng.fill_bytes(&mut buf);
20862        let mut unstructured = Unstructured::new(&buf);
20863        Self::arbitrary(&mut unstructured).unwrap_or_default()
20864    }
20865}
20866impl Default for NAV_CONTROLLER_OUTPUT_DATA {
20867    fn default() -> Self {
20868        Self::DEFAULT.clone()
20869    }
20870}
20871impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
20872    type Message = MavMessage;
20873    const ID: u32 = 62u32;
20874    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
20875    const EXTRA_CRC: u8 = 183u8;
20876    const ENCODED_LEN: usize = 26usize;
20877    fn deser(
20878        _version: MavlinkVersion,
20879        __input: &[u8],
20880    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20881        let avail_len = __input.len();
20882        let mut payload_buf = [0; Self::ENCODED_LEN];
20883        let mut buf = if avail_len < Self::ENCODED_LEN {
20884            payload_buf[0..avail_len].copy_from_slice(__input);
20885            Bytes::new(&payload_buf)
20886        } else {
20887            Bytes::new(__input)
20888        };
20889        let mut __struct = Self::default();
20890        __struct.nav_roll = buf.get_f32_le();
20891        __struct.nav_pitch = buf.get_f32_le();
20892        __struct.alt_error = buf.get_f32_le();
20893        __struct.aspd_error = buf.get_f32_le();
20894        __struct.xtrack_error = buf.get_f32_le();
20895        __struct.nav_bearing = buf.get_i16_le();
20896        __struct.target_bearing = buf.get_i16_le();
20897        __struct.wp_dist = buf.get_u16_le();
20898        Ok(__struct)
20899    }
20900    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20901        let mut __tmp = BytesMut::new(bytes);
20902        #[allow(clippy::absurd_extreme_comparisons)]
20903        #[allow(unused_comparisons)]
20904        if __tmp.remaining() < Self::ENCODED_LEN {
20905            panic!(
20906                "buffer is too small (need {} bytes, but got {})",
20907                Self::ENCODED_LEN,
20908                __tmp.remaining(),
20909            )
20910        }
20911        __tmp.put_f32_le(self.nav_roll);
20912        __tmp.put_f32_le(self.nav_pitch);
20913        __tmp.put_f32_le(self.alt_error);
20914        __tmp.put_f32_le(self.aspd_error);
20915        __tmp.put_f32_le(self.xtrack_error);
20916        __tmp.put_i16_le(self.nav_bearing);
20917        __tmp.put_i16_le(self.target_bearing);
20918        __tmp.put_u16_le(self.wp_dist);
20919        if matches!(version, MavlinkVersion::V2) {
20920            let len = __tmp.len();
20921            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20922        } else {
20923            __tmp.len()
20924        }
20925    }
20926}
20927#[doc = "Accelerometer and Gyro biases from the navigation filter."]
20928#[doc = ""]
20929#[doc = "ID: 220"]
20930#[derive(Debug, Clone, PartialEq)]
20931#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20932#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20933#[cfg_attr(feature = "ts", derive(TS))]
20934#[cfg_attr(feature = "ts", ts(export))]
20935pub struct NAV_FILTER_BIAS_DATA {
20936    #[doc = "Timestamp (microseconds)"]
20937    pub usec: u64,
20938    #[doc = "b_f[0]"]
20939    pub accel_0: f32,
20940    #[doc = "b_f[1]"]
20941    pub accel_1: f32,
20942    #[doc = "b_f[2]"]
20943    pub accel_2: f32,
20944    #[doc = "b_f[0]"]
20945    pub gyro_0: f32,
20946    #[doc = "b_f[1]"]
20947    pub gyro_1: f32,
20948    #[doc = "b_f[2]"]
20949    pub gyro_2: f32,
20950}
20951impl NAV_FILTER_BIAS_DATA {
20952    pub const ENCODED_LEN: usize = 32usize;
20953    pub const DEFAULT: Self = Self {
20954        usec: 0_u64,
20955        accel_0: 0.0_f32,
20956        accel_1: 0.0_f32,
20957        accel_2: 0.0_f32,
20958        gyro_0: 0.0_f32,
20959        gyro_1: 0.0_f32,
20960        gyro_2: 0.0_f32,
20961    };
20962    #[cfg(feature = "arbitrary")]
20963    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20964        use arbitrary::{Arbitrary, Unstructured};
20965        let mut buf = [0u8; 1024];
20966        rng.fill_bytes(&mut buf);
20967        let mut unstructured = Unstructured::new(&buf);
20968        Self::arbitrary(&mut unstructured).unwrap_or_default()
20969    }
20970}
20971impl Default for NAV_FILTER_BIAS_DATA {
20972    fn default() -> Self {
20973        Self::DEFAULT.clone()
20974    }
20975}
20976impl MessageData for NAV_FILTER_BIAS_DATA {
20977    type Message = MavMessage;
20978    const ID: u32 = 220u32;
20979    const NAME: &'static str = "NAV_FILTER_BIAS";
20980    const EXTRA_CRC: u8 = 34u8;
20981    const ENCODED_LEN: usize = 32usize;
20982    fn deser(
20983        _version: MavlinkVersion,
20984        __input: &[u8],
20985    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20986        let avail_len = __input.len();
20987        let mut payload_buf = [0; Self::ENCODED_LEN];
20988        let mut buf = if avail_len < Self::ENCODED_LEN {
20989            payload_buf[0..avail_len].copy_from_slice(__input);
20990            Bytes::new(&payload_buf)
20991        } else {
20992            Bytes::new(__input)
20993        };
20994        let mut __struct = Self::default();
20995        __struct.usec = buf.get_u64_le();
20996        __struct.accel_0 = buf.get_f32_le();
20997        __struct.accel_1 = buf.get_f32_le();
20998        __struct.accel_2 = buf.get_f32_le();
20999        __struct.gyro_0 = buf.get_f32_le();
21000        __struct.gyro_1 = buf.get_f32_le();
21001        __struct.gyro_2 = buf.get_f32_le();
21002        Ok(__struct)
21003    }
21004    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21005        let mut __tmp = BytesMut::new(bytes);
21006        #[allow(clippy::absurd_extreme_comparisons)]
21007        #[allow(unused_comparisons)]
21008        if __tmp.remaining() < Self::ENCODED_LEN {
21009            panic!(
21010                "buffer is too small (need {} bytes, but got {})",
21011                Self::ENCODED_LEN,
21012                __tmp.remaining(),
21013            )
21014        }
21015        __tmp.put_u64_le(self.usec);
21016        __tmp.put_f32_le(self.accel_0);
21017        __tmp.put_f32_le(self.accel_1);
21018        __tmp.put_f32_le(self.accel_2);
21019        __tmp.put_f32_le(self.gyro_0);
21020        __tmp.put_f32_le(self.gyro_1);
21021        __tmp.put_f32_le(self.gyro_2);
21022        if matches!(version, MavlinkVersion::V2) {
21023            let len = __tmp.len();
21024            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21025        } else {
21026            __tmp.len()
21027        }
21028    }
21029}
21030#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
21031#[doc = ""]
21032#[doc = "ID: 330"]
21033#[derive(Debug, Clone, PartialEq)]
21034#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21035#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21036#[cfg_attr(feature = "ts", derive(TS))]
21037#[cfg_attr(feature = "ts", ts(export))]
21038pub struct OBSTACLE_DISTANCE_DATA {
21039    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21040    pub time_usec: u64,
21041    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
21042    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21043    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21044    pub distances: [u16; 72],
21045    #[doc = "Minimum distance the sensor can measure."]
21046    pub min_distance: u16,
21047    #[doc = "Maximum distance the sensor can measure."]
21048    pub max_distance: u16,
21049    #[doc = "Class id of the distance sensor type."]
21050    pub sensor_type: MavDistanceSensor,
21051    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
21052    pub increment: u8,
21053    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
21054    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21055    pub increment_f: f32,
21056    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
21057    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21058    pub angle_offset: f32,
21059    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
21060    #[cfg_attr(feature = "serde", serde(default))]
21061    pub frame: MavFrame,
21062}
21063impl OBSTACLE_DISTANCE_DATA {
21064    pub const ENCODED_LEN: usize = 167usize;
21065    pub const DEFAULT: Self = Self {
21066        time_usec: 0_u64,
21067        distances: [0_u16; 72usize],
21068        min_distance: 0_u16,
21069        max_distance: 0_u16,
21070        sensor_type: MavDistanceSensor::DEFAULT,
21071        increment: 0_u8,
21072        increment_f: 0.0_f32,
21073        angle_offset: 0.0_f32,
21074        frame: MavFrame::DEFAULT,
21075    };
21076    #[cfg(feature = "arbitrary")]
21077    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21078        use arbitrary::{Arbitrary, Unstructured};
21079        let mut buf = [0u8; 1024];
21080        rng.fill_bytes(&mut buf);
21081        let mut unstructured = Unstructured::new(&buf);
21082        Self::arbitrary(&mut unstructured).unwrap_or_default()
21083    }
21084}
21085impl Default for OBSTACLE_DISTANCE_DATA {
21086    fn default() -> Self {
21087        Self::DEFAULT.clone()
21088    }
21089}
21090impl MessageData for OBSTACLE_DISTANCE_DATA {
21091    type Message = MavMessage;
21092    const ID: u32 = 330u32;
21093    const NAME: &'static str = "OBSTACLE_DISTANCE";
21094    const EXTRA_CRC: u8 = 23u8;
21095    const ENCODED_LEN: usize = 167usize;
21096    fn deser(
21097        _version: MavlinkVersion,
21098        __input: &[u8],
21099    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21100        let avail_len = __input.len();
21101        let mut payload_buf = [0; Self::ENCODED_LEN];
21102        let mut buf = if avail_len < Self::ENCODED_LEN {
21103            payload_buf[0..avail_len].copy_from_slice(__input);
21104            Bytes::new(&payload_buf)
21105        } else {
21106            Bytes::new(__input)
21107        };
21108        let mut __struct = Self::default();
21109        __struct.time_usec = buf.get_u64_le();
21110        for v in &mut __struct.distances {
21111            let val = buf.get_u16_le();
21112            *v = val;
21113        }
21114        __struct.min_distance = buf.get_u16_le();
21115        __struct.max_distance = buf.get_u16_le();
21116        let tmp = buf.get_u8();
21117        __struct.sensor_type =
21118            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21119                enum_type: "MavDistanceSensor",
21120                value: tmp as u32,
21121            })?;
21122        __struct.increment = buf.get_u8();
21123        __struct.increment_f = buf.get_f32_le();
21124        __struct.angle_offset = buf.get_f32_le();
21125        let tmp = buf.get_u8();
21126        __struct.frame =
21127            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21128                enum_type: "MavFrame",
21129                value: tmp as u32,
21130            })?;
21131        Ok(__struct)
21132    }
21133    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21134        let mut __tmp = BytesMut::new(bytes);
21135        #[allow(clippy::absurd_extreme_comparisons)]
21136        #[allow(unused_comparisons)]
21137        if __tmp.remaining() < Self::ENCODED_LEN {
21138            panic!(
21139                "buffer is too small (need {} bytes, but got {})",
21140                Self::ENCODED_LEN,
21141                __tmp.remaining(),
21142            )
21143        }
21144        __tmp.put_u64_le(self.time_usec);
21145        for val in &self.distances {
21146            __tmp.put_u16_le(*val);
21147        }
21148        __tmp.put_u16_le(self.min_distance);
21149        __tmp.put_u16_le(self.max_distance);
21150        __tmp.put_u8(self.sensor_type as u8);
21151        __tmp.put_u8(self.increment);
21152        if matches!(version, MavlinkVersion::V2) {
21153            __tmp.put_f32_le(self.increment_f);
21154            __tmp.put_f32_le(self.angle_offset);
21155            __tmp.put_u8(self.frame as u8);
21156            let len = __tmp.len();
21157            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21158        } else {
21159            __tmp.len()
21160        }
21161    }
21162}
21163#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
21164#[doc = ""]
21165#[doc = "ID: 331"]
21166#[derive(Debug, Clone, PartialEq)]
21167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21169#[cfg_attr(feature = "ts", derive(TS))]
21170#[cfg_attr(feature = "ts", ts(export))]
21171pub struct ODOMETRY_DATA {
21172    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21173    pub time_usec: u64,
21174    #[doc = "X Position"]
21175    pub x: f32,
21176    #[doc = "Y Position"]
21177    pub y: f32,
21178    #[doc = "Z Position"]
21179    pub z: f32,
21180    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
21181    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21182    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21183    pub q: [f32; 4],
21184    #[doc = "X linear speed"]
21185    pub vx: f32,
21186    #[doc = "Y linear speed"]
21187    pub vy: f32,
21188    #[doc = "Z linear speed"]
21189    pub vz: f32,
21190    #[doc = "Roll angular speed"]
21191    pub rollspeed: f32,
21192    #[doc = "Pitch angular speed"]
21193    pub pitchspeed: f32,
21194    #[doc = "Yaw angular speed"]
21195    pub yawspeed: f32,
21196    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21197    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21198    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21199    pub pose_covariance: [f32; 21],
21200    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21201    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21202    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21203    pub velocity_covariance: [f32; 21],
21204    #[doc = "Coordinate frame of reference for the pose data."]
21205    pub frame_id: MavFrame,
21206    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
21207    pub child_frame_id: MavFrame,
21208    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
21209    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21210    pub reset_counter: u8,
21211    #[doc = "Type of estimator that is providing the odometry."]
21212    #[cfg_attr(feature = "serde", serde(default))]
21213    pub estimator_type: MavEstimatorType,
21214    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
21215    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21216    pub quality: i8,
21217}
21218impl ODOMETRY_DATA {
21219    pub const ENCODED_LEN: usize = 233usize;
21220    pub const DEFAULT: Self = Self {
21221        time_usec: 0_u64,
21222        x: 0.0_f32,
21223        y: 0.0_f32,
21224        z: 0.0_f32,
21225        q: [0.0_f32; 4usize],
21226        vx: 0.0_f32,
21227        vy: 0.0_f32,
21228        vz: 0.0_f32,
21229        rollspeed: 0.0_f32,
21230        pitchspeed: 0.0_f32,
21231        yawspeed: 0.0_f32,
21232        pose_covariance: [0.0_f32; 21usize],
21233        velocity_covariance: [0.0_f32; 21usize],
21234        frame_id: MavFrame::DEFAULT,
21235        child_frame_id: MavFrame::DEFAULT,
21236        reset_counter: 0_u8,
21237        estimator_type: MavEstimatorType::DEFAULT,
21238        quality: 0_i8,
21239    };
21240    #[cfg(feature = "arbitrary")]
21241    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21242        use arbitrary::{Arbitrary, Unstructured};
21243        let mut buf = [0u8; 1024];
21244        rng.fill_bytes(&mut buf);
21245        let mut unstructured = Unstructured::new(&buf);
21246        Self::arbitrary(&mut unstructured).unwrap_or_default()
21247    }
21248}
21249impl Default for ODOMETRY_DATA {
21250    fn default() -> Self {
21251        Self::DEFAULT.clone()
21252    }
21253}
21254impl MessageData for ODOMETRY_DATA {
21255    type Message = MavMessage;
21256    const ID: u32 = 331u32;
21257    const NAME: &'static str = "ODOMETRY";
21258    const EXTRA_CRC: u8 = 91u8;
21259    const ENCODED_LEN: usize = 233usize;
21260    fn deser(
21261        _version: MavlinkVersion,
21262        __input: &[u8],
21263    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21264        let avail_len = __input.len();
21265        let mut payload_buf = [0; Self::ENCODED_LEN];
21266        let mut buf = if avail_len < Self::ENCODED_LEN {
21267            payload_buf[0..avail_len].copy_from_slice(__input);
21268            Bytes::new(&payload_buf)
21269        } else {
21270            Bytes::new(__input)
21271        };
21272        let mut __struct = Self::default();
21273        __struct.time_usec = buf.get_u64_le();
21274        __struct.x = buf.get_f32_le();
21275        __struct.y = buf.get_f32_le();
21276        __struct.z = buf.get_f32_le();
21277        for v in &mut __struct.q {
21278            let val = buf.get_f32_le();
21279            *v = val;
21280        }
21281        __struct.vx = buf.get_f32_le();
21282        __struct.vy = buf.get_f32_le();
21283        __struct.vz = buf.get_f32_le();
21284        __struct.rollspeed = buf.get_f32_le();
21285        __struct.pitchspeed = buf.get_f32_le();
21286        __struct.yawspeed = buf.get_f32_le();
21287        for v in &mut __struct.pose_covariance {
21288            let val = buf.get_f32_le();
21289            *v = val;
21290        }
21291        for v in &mut __struct.velocity_covariance {
21292            let val = buf.get_f32_le();
21293            *v = val;
21294        }
21295        let tmp = buf.get_u8();
21296        __struct.frame_id =
21297            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21298                enum_type: "MavFrame",
21299                value: tmp as u32,
21300            })?;
21301        let tmp = buf.get_u8();
21302        __struct.child_frame_id =
21303            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21304                enum_type: "MavFrame",
21305                value: tmp as u32,
21306            })?;
21307        __struct.reset_counter = buf.get_u8();
21308        let tmp = buf.get_u8();
21309        __struct.estimator_type =
21310            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21311                enum_type: "MavEstimatorType",
21312                value: tmp as u32,
21313            })?;
21314        __struct.quality = buf.get_i8();
21315        Ok(__struct)
21316    }
21317    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21318        let mut __tmp = BytesMut::new(bytes);
21319        #[allow(clippy::absurd_extreme_comparisons)]
21320        #[allow(unused_comparisons)]
21321        if __tmp.remaining() < Self::ENCODED_LEN {
21322            panic!(
21323                "buffer is too small (need {} bytes, but got {})",
21324                Self::ENCODED_LEN,
21325                __tmp.remaining(),
21326            )
21327        }
21328        __tmp.put_u64_le(self.time_usec);
21329        __tmp.put_f32_le(self.x);
21330        __tmp.put_f32_le(self.y);
21331        __tmp.put_f32_le(self.z);
21332        for val in &self.q {
21333            __tmp.put_f32_le(*val);
21334        }
21335        __tmp.put_f32_le(self.vx);
21336        __tmp.put_f32_le(self.vy);
21337        __tmp.put_f32_le(self.vz);
21338        __tmp.put_f32_le(self.rollspeed);
21339        __tmp.put_f32_le(self.pitchspeed);
21340        __tmp.put_f32_le(self.yawspeed);
21341        for val in &self.pose_covariance {
21342            __tmp.put_f32_le(*val);
21343        }
21344        for val in &self.velocity_covariance {
21345            __tmp.put_f32_le(*val);
21346        }
21347        __tmp.put_u8(self.frame_id as u8);
21348        __tmp.put_u8(self.child_frame_id as u8);
21349        if matches!(version, MavlinkVersion::V2) {
21350            __tmp.put_u8(self.reset_counter);
21351            __tmp.put_u8(self.estimator_type as u8);
21352            __tmp.put_i8(self.quality);
21353            let len = __tmp.len();
21354            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21355        } else {
21356            __tmp.len()
21357        }
21358    }
21359}
21360#[doc = "Hardware status sent by an onboard computer."]
21361#[doc = ""]
21362#[doc = "ID: 390"]
21363#[derive(Debug, Clone, PartialEq)]
21364#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21366#[cfg_attr(feature = "ts", derive(TS))]
21367#[cfg_attr(feature = "ts", ts(export))]
21368pub struct ONBOARD_COMPUTER_STATUS_DATA {
21369    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21370    pub time_usec: u64,
21371    #[doc = "Time since system boot."]
21372    pub uptime: u32,
21373    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21374    pub ram_usage: u32,
21375    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21376    pub ram_total: u32,
21377    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
21378    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21379    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21380    pub storage_type: [u32; 4],
21381    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21382    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21383    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21384    pub storage_usage: [u32; 4],
21385    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21386    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21387    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21388    pub storage_total: [u32; 4],
21389    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
21390    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21391    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21392    pub link_type: [u32; 6],
21393    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
21394    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21395    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21396    pub link_tx_rate: [u32; 6],
21397    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
21398    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21399    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21400    pub link_rx_rate: [u32; 6],
21401    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
21402    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21403    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21404    pub link_tx_max: [u32; 6],
21405    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
21406    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21407    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21408    pub link_rx_max: [u32; 6],
21409    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
21410    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21411    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21412    pub fan_speed: [i16; 4],
21413    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
21414    pub mavtype: u8,
21415    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21416    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21417    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21418    pub cpu_cores: [u8; 8],
21419    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21420    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21421    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21422    pub cpu_combined: [u8; 10],
21423    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21424    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21425    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21426    pub gpu_cores: [u8; 4],
21427    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21428    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21429    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21430    pub gpu_combined: [u8; 10],
21431    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
21432    pub temperature_board: i8,
21433    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
21434    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21435    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21436    pub temperature_core: [i8; 8],
21437}
21438impl ONBOARD_COMPUTER_STATUS_DATA {
21439    pub const ENCODED_LEN: usize = 238usize;
21440    pub const DEFAULT: Self = Self {
21441        time_usec: 0_u64,
21442        uptime: 0_u32,
21443        ram_usage: 0_u32,
21444        ram_total: 0_u32,
21445        storage_type: [0_u32; 4usize],
21446        storage_usage: [0_u32; 4usize],
21447        storage_total: [0_u32; 4usize],
21448        link_type: [0_u32; 6usize],
21449        link_tx_rate: [0_u32; 6usize],
21450        link_rx_rate: [0_u32; 6usize],
21451        link_tx_max: [0_u32; 6usize],
21452        link_rx_max: [0_u32; 6usize],
21453        fan_speed: [0_i16; 4usize],
21454        mavtype: 0_u8,
21455        cpu_cores: [0_u8; 8usize],
21456        cpu_combined: [0_u8; 10usize],
21457        gpu_cores: [0_u8; 4usize],
21458        gpu_combined: [0_u8; 10usize],
21459        temperature_board: 0_i8,
21460        temperature_core: [0_i8; 8usize],
21461    };
21462    #[cfg(feature = "arbitrary")]
21463    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21464        use arbitrary::{Arbitrary, Unstructured};
21465        let mut buf = [0u8; 1024];
21466        rng.fill_bytes(&mut buf);
21467        let mut unstructured = Unstructured::new(&buf);
21468        Self::arbitrary(&mut unstructured).unwrap_or_default()
21469    }
21470}
21471impl Default for ONBOARD_COMPUTER_STATUS_DATA {
21472    fn default() -> Self {
21473        Self::DEFAULT.clone()
21474    }
21475}
21476impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
21477    type Message = MavMessage;
21478    const ID: u32 = 390u32;
21479    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
21480    const EXTRA_CRC: u8 = 156u8;
21481    const ENCODED_LEN: usize = 238usize;
21482    fn deser(
21483        _version: MavlinkVersion,
21484        __input: &[u8],
21485    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21486        let avail_len = __input.len();
21487        let mut payload_buf = [0; Self::ENCODED_LEN];
21488        let mut buf = if avail_len < Self::ENCODED_LEN {
21489            payload_buf[0..avail_len].copy_from_slice(__input);
21490            Bytes::new(&payload_buf)
21491        } else {
21492            Bytes::new(__input)
21493        };
21494        let mut __struct = Self::default();
21495        __struct.time_usec = buf.get_u64_le();
21496        __struct.uptime = buf.get_u32_le();
21497        __struct.ram_usage = buf.get_u32_le();
21498        __struct.ram_total = buf.get_u32_le();
21499        for v in &mut __struct.storage_type {
21500            let val = buf.get_u32_le();
21501            *v = val;
21502        }
21503        for v in &mut __struct.storage_usage {
21504            let val = buf.get_u32_le();
21505            *v = val;
21506        }
21507        for v in &mut __struct.storage_total {
21508            let val = buf.get_u32_le();
21509            *v = val;
21510        }
21511        for v in &mut __struct.link_type {
21512            let val = buf.get_u32_le();
21513            *v = val;
21514        }
21515        for v in &mut __struct.link_tx_rate {
21516            let val = buf.get_u32_le();
21517            *v = val;
21518        }
21519        for v in &mut __struct.link_rx_rate {
21520            let val = buf.get_u32_le();
21521            *v = val;
21522        }
21523        for v in &mut __struct.link_tx_max {
21524            let val = buf.get_u32_le();
21525            *v = val;
21526        }
21527        for v in &mut __struct.link_rx_max {
21528            let val = buf.get_u32_le();
21529            *v = val;
21530        }
21531        for v in &mut __struct.fan_speed {
21532            let val = buf.get_i16_le();
21533            *v = val;
21534        }
21535        __struct.mavtype = buf.get_u8();
21536        for v in &mut __struct.cpu_cores {
21537            let val = buf.get_u8();
21538            *v = val;
21539        }
21540        for v in &mut __struct.cpu_combined {
21541            let val = buf.get_u8();
21542            *v = val;
21543        }
21544        for v in &mut __struct.gpu_cores {
21545            let val = buf.get_u8();
21546            *v = val;
21547        }
21548        for v in &mut __struct.gpu_combined {
21549            let val = buf.get_u8();
21550            *v = val;
21551        }
21552        __struct.temperature_board = buf.get_i8();
21553        for v in &mut __struct.temperature_core {
21554            let val = buf.get_i8();
21555            *v = val;
21556        }
21557        Ok(__struct)
21558    }
21559    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21560        let mut __tmp = BytesMut::new(bytes);
21561        #[allow(clippy::absurd_extreme_comparisons)]
21562        #[allow(unused_comparisons)]
21563        if __tmp.remaining() < Self::ENCODED_LEN {
21564            panic!(
21565                "buffer is too small (need {} bytes, but got {})",
21566                Self::ENCODED_LEN,
21567                __tmp.remaining(),
21568            )
21569        }
21570        __tmp.put_u64_le(self.time_usec);
21571        __tmp.put_u32_le(self.uptime);
21572        __tmp.put_u32_le(self.ram_usage);
21573        __tmp.put_u32_le(self.ram_total);
21574        for val in &self.storage_type {
21575            __tmp.put_u32_le(*val);
21576        }
21577        for val in &self.storage_usage {
21578            __tmp.put_u32_le(*val);
21579        }
21580        for val in &self.storage_total {
21581            __tmp.put_u32_le(*val);
21582        }
21583        for val in &self.link_type {
21584            __tmp.put_u32_le(*val);
21585        }
21586        for val in &self.link_tx_rate {
21587            __tmp.put_u32_le(*val);
21588        }
21589        for val in &self.link_rx_rate {
21590            __tmp.put_u32_le(*val);
21591        }
21592        for val in &self.link_tx_max {
21593            __tmp.put_u32_le(*val);
21594        }
21595        for val in &self.link_rx_max {
21596            __tmp.put_u32_le(*val);
21597        }
21598        for val in &self.fan_speed {
21599            __tmp.put_i16_le(*val);
21600        }
21601        __tmp.put_u8(self.mavtype);
21602        for val in &self.cpu_cores {
21603            __tmp.put_u8(*val);
21604        }
21605        for val in &self.cpu_combined {
21606            __tmp.put_u8(*val);
21607        }
21608        for val in &self.gpu_cores {
21609            __tmp.put_u8(*val);
21610        }
21611        for val in &self.gpu_combined {
21612            __tmp.put_u8(*val);
21613        }
21614        __tmp.put_i8(self.temperature_board);
21615        for val in &self.temperature_core {
21616            __tmp.put_i8(*val);
21617        }
21618        if matches!(version, MavlinkVersion::V2) {
21619            let len = __tmp.len();
21620            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21621        } else {
21622            __tmp.len()
21623        }
21624    }
21625}
21626#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
21627#[doc = ""]
21628#[doc = "ID: 12918"]
21629#[derive(Debug, Clone, PartialEq)]
21630#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21631#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21632#[cfg_attr(feature = "ts", derive(TS))]
21633#[cfg_attr(feature = "ts", ts(export))]
21634pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
21635    #[doc = "Status level indicating if arming is allowed."]
21636    pub status: MavOdidArmStatus,
21637    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
21638    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21639    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21640    pub error: [u8; 50],
21641}
21642impl OPEN_DRONE_ID_ARM_STATUS_DATA {
21643    pub const ENCODED_LEN: usize = 51usize;
21644    pub const DEFAULT: Self = Self {
21645        status: MavOdidArmStatus::DEFAULT,
21646        error: [0_u8; 50usize],
21647    };
21648    #[cfg(feature = "arbitrary")]
21649    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21650        use arbitrary::{Arbitrary, Unstructured};
21651        let mut buf = [0u8; 1024];
21652        rng.fill_bytes(&mut buf);
21653        let mut unstructured = Unstructured::new(&buf);
21654        Self::arbitrary(&mut unstructured).unwrap_or_default()
21655    }
21656}
21657impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
21658    fn default() -> Self {
21659        Self::DEFAULT.clone()
21660    }
21661}
21662impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
21663    type Message = MavMessage;
21664    const ID: u32 = 12918u32;
21665    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
21666    const EXTRA_CRC: u8 = 139u8;
21667    const ENCODED_LEN: usize = 51usize;
21668    fn deser(
21669        _version: MavlinkVersion,
21670        __input: &[u8],
21671    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21672        let avail_len = __input.len();
21673        let mut payload_buf = [0; Self::ENCODED_LEN];
21674        let mut buf = if avail_len < Self::ENCODED_LEN {
21675            payload_buf[0..avail_len].copy_from_slice(__input);
21676            Bytes::new(&payload_buf)
21677        } else {
21678            Bytes::new(__input)
21679        };
21680        let mut __struct = Self::default();
21681        let tmp = buf.get_u8();
21682        __struct.status =
21683            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21684                enum_type: "MavOdidArmStatus",
21685                value: tmp as u32,
21686            })?;
21687        for v in &mut __struct.error {
21688            let val = buf.get_u8();
21689            *v = val;
21690        }
21691        Ok(__struct)
21692    }
21693    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21694        let mut __tmp = BytesMut::new(bytes);
21695        #[allow(clippy::absurd_extreme_comparisons)]
21696        #[allow(unused_comparisons)]
21697        if __tmp.remaining() < Self::ENCODED_LEN {
21698            panic!(
21699                "buffer is too small (need {} bytes, but got {})",
21700                Self::ENCODED_LEN,
21701                __tmp.remaining(),
21702            )
21703        }
21704        __tmp.put_u8(self.status as u8);
21705        for val in &self.error {
21706            __tmp.put_u8(*val);
21707        }
21708        if matches!(version, MavlinkVersion::V2) {
21709            let len = __tmp.len();
21710            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21711        } else {
21712            __tmp.len()
21713        }
21714    }
21715}
21716#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
21717#[doc = ""]
21718#[doc = "ID: 12902"]
21719#[derive(Debug, Clone, PartialEq)]
21720#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21721#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21722#[cfg_attr(feature = "ts", derive(TS))]
21723#[cfg_attr(feature = "ts", ts(export))]
21724pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
21725    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
21726    pub timestamp: u32,
21727    #[doc = "System ID (0 for broadcast)."]
21728    pub target_system: u8,
21729    #[doc = "Component ID (0 for broadcast)."]
21730    pub target_component: u8,
21731    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21732    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21733    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21734    pub id_or_mac: [u8; 20],
21735    #[doc = "Indicates the type of authentication."]
21736    pub authentication_type: MavOdidAuthType,
21737    #[doc = "Allowed range is 0 - 15."]
21738    pub data_page: u8,
21739    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21740    pub last_page_index: u8,
21741    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21742    pub length: u8,
21743    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
21744    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21745    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21746    pub authentication_data: [u8; 23],
21747}
21748impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
21749    pub const ENCODED_LEN: usize = 53usize;
21750    pub const DEFAULT: Self = Self {
21751        timestamp: 0_u32,
21752        target_system: 0_u8,
21753        target_component: 0_u8,
21754        id_or_mac: [0_u8; 20usize],
21755        authentication_type: MavOdidAuthType::DEFAULT,
21756        data_page: 0_u8,
21757        last_page_index: 0_u8,
21758        length: 0_u8,
21759        authentication_data: [0_u8; 23usize],
21760    };
21761    #[cfg(feature = "arbitrary")]
21762    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21763        use arbitrary::{Arbitrary, Unstructured};
21764        let mut buf = [0u8; 1024];
21765        rng.fill_bytes(&mut buf);
21766        let mut unstructured = Unstructured::new(&buf);
21767        Self::arbitrary(&mut unstructured).unwrap_or_default()
21768    }
21769}
21770impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21771    fn default() -> Self {
21772        Self::DEFAULT.clone()
21773    }
21774}
21775impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21776    type Message = MavMessage;
21777    const ID: u32 = 12902u32;
21778    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
21779    const EXTRA_CRC: u8 = 140u8;
21780    const ENCODED_LEN: usize = 53usize;
21781    fn deser(
21782        _version: MavlinkVersion,
21783        __input: &[u8],
21784    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21785        let avail_len = __input.len();
21786        let mut payload_buf = [0; Self::ENCODED_LEN];
21787        let mut buf = if avail_len < Self::ENCODED_LEN {
21788            payload_buf[0..avail_len].copy_from_slice(__input);
21789            Bytes::new(&payload_buf)
21790        } else {
21791            Bytes::new(__input)
21792        };
21793        let mut __struct = Self::default();
21794        __struct.timestamp = buf.get_u32_le();
21795        __struct.target_system = buf.get_u8();
21796        __struct.target_component = buf.get_u8();
21797        for v in &mut __struct.id_or_mac {
21798            let val = buf.get_u8();
21799            *v = val;
21800        }
21801        let tmp = buf.get_u8();
21802        __struct.authentication_type =
21803            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21804                enum_type: "MavOdidAuthType",
21805                value: tmp as u32,
21806            })?;
21807        __struct.data_page = buf.get_u8();
21808        __struct.last_page_index = buf.get_u8();
21809        __struct.length = buf.get_u8();
21810        for v in &mut __struct.authentication_data {
21811            let val = buf.get_u8();
21812            *v = val;
21813        }
21814        Ok(__struct)
21815    }
21816    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21817        let mut __tmp = BytesMut::new(bytes);
21818        #[allow(clippy::absurd_extreme_comparisons)]
21819        #[allow(unused_comparisons)]
21820        if __tmp.remaining() < Self::ENCODED_LEN {
21821            panic!(
21822                "buffer is too small (need {} bytes, but got {})",
21823                Self::ENCODED_LEN,
21824                __tmp.remaining(),
21825            )
21826        }
21827        __tmp.put_u32_le(self.timestamp);
21828        __tmp.put_u8(self.target_system);
21829        __tmp.put_u8(self.target_component);
21830        for val in &self.id_or_mac {
21831            __tmp.put_u8(*val);
21832        }
21833        __tmp.put_u8(self.authentication_type as u8);
21834        __tmp.put_u8(self.data_page);
21835        __tmp.put_u8(self.last_page_index);
21836        __tmp.put_u8(self.length);
21837        for val in &self.authentication_data {
21838            __tmp.put_u8(*val);
21839        }
21840        if matches!(version, MavlinkVersion::V2) {
21841            let len = __tmp.len();
21842            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21843        } else {
21844            __tmp.len()
21845        }
21846    }
21847}
21848#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
21849#[doc = ""]
21850#[doc = "ID: 12900"]
21851#[derive(Debug, Clone, PartialEq)]
21852#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21853#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21854#[cfg_attr(feature = "ts", derive(TS))]
21855#[cfg_attr(feature = "ts", ts(export))]
21856pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
21857    #[doc = "System ID (0 for broadcast)."]
21858    pub target_system: u8,
21859    #[doc = "Component ID (0 for broadcast)."]
21860    pub target_component: u8,
21861    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21862    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21863    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21864    pub id_or_mac: [u8; 20],
21865    #[doc = "Indicates the format for the uas_id field of this message."]
21866    pub id_type: MavOdidIdType,
21867    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
21868    pub ua_type: MavOdidUaType,
21869    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
21870    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21871    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21872    pub uas_id: [u8; 20],
21873}
21874impl OPEN_DRONE_ID_BASIC_ID_DATA {
21875    pub const ENCODED_LEN: usize = 44usize;
21876    pub const DEFAULT: Self = Self {
21877        target_system: 0_u8,
21878        target_component: 0_u8,
21879        id_or_mac: [0_u8; 20usize],
21880        id_type: MavOdidIdType::DEFAULT,
21881        ua_type: MavOdidUaType::DEFAULT,
21882        uas_id: [0_u8; 20usize],
21883    };
21884    #[cfg(feature = "arbitrary")]
21885    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21886        use arbitrary::{Arbitrary, Unstructured};
21887        let mut buf = [0u8; 1024];
21888        rng.fill_bytes(&mut buf);
21889        let mut unstructured = Unstructured::new(&buf);
21890        Self::arbitrary(&mut unstructured).unwrap_or_default()
21891    }
21892}
21893impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
21894    fn default() -> Self {
21895        Self::DEFAULT.clone()
21896    }
21897}
21898impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
21899    type Message = MavMessage;
21900    const ID: u32 = 12900u32;
21901    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
21902    const EXTRA_CRC: u8 = 114u8;
21903    const ENCODED_LEN: usize = 44usize;
21904    fn deser(
21905        _version: MavlinkVersion,
21906        __input: &[u8],
21907    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21908        let avail_len = __input.len();
21909        let mut payload_buf = [0; Self::ENCODED_LEN];
21910        let mut buf = if avail_len < Self::ENCODED_LEN {
21911            payload_buf[0..avail_len].copy_from_slice(__input);
21912            Bytes::new(&payload_buf)
21913        } else {
21914            Bytes::new(__input)
21915        };
21916        let mut __struct = Self::default();
21917        __struct.target_system = buf.get_u8();
21918        __struct.target_component = buf.get_u8();
21919        for v in &mut __struct.id_or_mac {
21920            let val = buf.get_u8();
21921            *v = val;
21922        }
21923        let tmp = buf.get_u8();
21924        __struct.id_type =
21925            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21926                enum_type: "MavOdidIdType",
21927                value: tmp as u32,
21928            })?;
21929        let tmp = buf.get_u8();
21930        __struct.ua_type =
21931            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21932                enum_type: "MavOdidUaType",
21933                value: tmp as u32,
21934            })?;
21935        for v in &mut __struct.uas_id {
21936            let val = buf.get_u8();
21937            *v = val;
21938        }
21939        Ok(__struct)
21940    }
21941    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21942        let mut __tmp = BytesMut::new(bytes);
21943        #[allow(clippy::absurd_extreme_comparisons)]
21944        #[allow(unused_comparisons)]
21945        if __tmp.remaining() < Self::ENCODED_LEN {
21946            panic!(
21947                "buffer is too small (need {} bytes, but got {})",
21948                Self::ENCODED_LEN,
21949                __tmp.remaining(),
21950            )
21951        }
21952        __tmp.put_u8(self.target_system);
21953        __tmp.put_u8(self.target_component);
21954        for val in &self.id_or_mac {
21955            __tmp.put_u8(*val);
21956        }
21957        __tmp.put_u8(self.id_type as u8);
21958        __tmp.put_u8(self.ua_type as u8);
21959        for val in &self.uas_id {
21960            __tmp.put_u8(*val);
21961        }
21962        if matches!(version, MavlinkVersion::V2) {
21963            let len = __tmp.len();
21964            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21965        } else {
21966            __tmp.len()
21967        }
21968    }
21969}
21970#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
21971#[doc = ""]
21972#[doc = "ID: 12901"]
21973#[derive(Debug, Clone, PartialEq)]
21974#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21975#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21976#[cfg_attr(feature = "ts", derive(TS))]
21977#[cfg_attr(feature = "ts", ts(export))]
21978pub struct OPEN_DRONE_ID_LOCATION_DATA {
21979    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21980    pub latitude: i32,
21981    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21982    pub longitude: i32,
21983    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
21984    pub altitude_barometric: f32,
21985    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
21986    pub altitude_geodetic: f32,
21987    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
21988    pub height: f32,
21989    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
21990    pub timestamp: f32,
21991    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
21992    pub direction: u16,
21993    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
21994    pub speed_horizontal: u16,
21995    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
21996    pub speed_vertical: i16,
21997    #[doc = "System ID (0 for broadcast)."]
21998    pub target_system: u8,
21999    #[doc = "Component ID (0 for broadcast)."]
22000    pub target_component: u8,
22001    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22002    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22003    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22004    pub id_or_mac: [u8; 20],
22005    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
22006    pub status: MavOdidStatus,
22007    #[doc = "Indicates the reference point for the height field."]
22008    pub height_reference: MavOdidHeightRef,
22009    #[doc = "The accuracy of the horizontal position."]
22010    pub horizontal_accuracy: MavOdidHorAcc,
22011    #[doc = "The accuracy of the vertical position."]
22012    pub vertical_accuracy: MavOdidVerAcc,
22013    #[doc = "The accuracy of the barometric altitude."]
22014    pub barometer_accuracy: MavOdidVerAcc,
22015    #[doc = "The accuracy of the horizontal and vertical speed."]
22016    pub speed_accuracy: MavOdidSpeedAcc,
22017    #[doc = "The accuracy of the timestamps."]
22018    pub timestamp_accuracy: MavOdidTimeAcc,
22019}
22020impl OPEN_DRONE_ID_LOCATION_DATA {
22021    pub const ENCODED_LEN: usize = 59usize;
22022    pub const DEFAULT: Self = Self {
22023        latitude: 0_i32,
22024        longitude: 0_i32,
22025        altitude_barometric: 0.0_f32,
22026        altitude_geodetic: 0.0_f32,
22027        height: 0.0_f32,
22028        timestamp: 0.0_f32,
22029        direction: 0_u16,
22030        speed_horizontal: 0_u16,
22031        speed_vertical: 0_i16,
22032        target_system: 0_u8,
22033        target_component: 0_u8,
22034        id_or_mac: [0_u8; 20usize],
22035        status: MavOdidStatus::DEFAULT,
22036        height_reference: MavOdidHeightRef::DEFAULT,
22037        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
22038        vertical_accuracy: MavOdidVerAcc::DEFAULT,
22039        barometer_accuracy: MavOdidVerAcc::DEFAULT,
22040        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
22041        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
22042    };
22043    #[cfg(feature = "arbitrary")]
22044    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22045        use arbitrary::{Arbitrary, Unstructured};
22046        let mut buf = [0u8; 1024];
22047        rng.fill_bytes(&mut buf);
22048        let mut unstructured = Unstructured::new(&buf);
22049        Self::arbitrary(&mut unstructured).unwrap_or_default()
22050    }
22051}
22052impl Default for OPEN_DRONE_ID_LOCATION_DATA {
22053    fn default() -> Self {
22054        Self::DEFAULT.clone()
22055    }
22056}
22057impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
22058    type Message = MavMessage;
22059    const ID: u32 = 12901u32;
22060    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
22061    const EXTRA_CRC: u8 = 254u8;
22062    const ENCODED_LEN: usize = 59usize;
22063    fn deser(
22064        _version: MavlinkVersion,
22065        __input: &[u8],
22066    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22067        let avail_len = __input.len();
22068        let mut payload_buf = [0; Self::ENCODED_LEN];
22069        let mut buf = if avail_len < Self::ENCODED_LEN {
22070            payload_buf[0..avail_len].copy_from_slice(__input);
22071            Bytes::new(&payload_buf)
22072        } else {
22073            Bytes::new(__input)
22074        };
22075        let mut __struct = Self::default();
22076        __struct.latitude = buf.get_i32_le();
22077        __struct.longitude = buf.get_i32_le();
22078        __struct.altitude_barometric = buf.get_f32_le();
22079        __struct.altitude_geodetic = buf.get_f32_le();
22080        __struct.height = buf.get_f32_le();
22081        __struct.timestamp = buf.get_f32_le();
22082        __struct.direction = buf.get_u16_le();
22083        __struct.speed_horizontal = buf.get_u16_le();
22084        __struct.speed_vertical = buf.get_i16_le();
22085        __struct.target_system = buf.get_u8();
22086        __struct.target_component = buf.get_u8();
22087        for v in &mut __struct.id_or_mac {
22088            let val = buf.get_u8();
22089            *v = val;
22090        }
22091        let tmp = buf.get_u8();
22092        __struct.status =
22093            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22094                enum_type: "MavOdidStatus",
22095                value: tmp as u32,
22096            })?;
22097        let tmp = buf.get_u8();
22098        __struct.height_reference =
22099            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22100                enum_type: "MavOdidHeightRef",
22101                value: tmp as u32,
22102            })?;
22103        let tmp = buf.get_u8();
22104        __struct.horizontal_accuracy =
22105            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22106                enum_type: "MavOdidHorAcc",
22107                value: tmp as u32,
22108            })?;
22109        let tmp = buf.get_u8();
22110        __struct.vertical_accuracy =
22111            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22112                enum_type: "MavOdidVerAcc",
22113                value: tmp as u32,
22114            })?;
22115        let tmp = buf.get_u8();
22116        __struct.barometer_accuracy =
22117            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22118                enum_type: "MavOdidVerAcc",
22119                value: tmp as u32,
22120            })?;
22121        let tmp = buf.get_u8();
22122        __struct.speed_accuracy =
22123            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22124                enum_type: "MavOdidSpeedAcc",
22125                value: tmp as u32,
22126            })?;
22127        let tmp = buf.get_u8();
22128        __struct.timestamp_accuracy =
22129            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22130                enum_type: "MavOdidTimeAcc",
22131                value: tmp as u32,
22132            })?;
22133        Ok(__struct)
22134    }
22135    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22136        let mut __tmp = BytesMut::new(bytes);
22137        #[allow(clippy::absurd_extreme_comparisons)]
22138        #[allow(unused_comparisons)]
22139        if __tmp.remaining() < Self::ENCODED_LEN {
22140            panic!(
22141                "buffer is too small (need {} bytes, but got {})",
22142                Self::ENCODED_LEN,
22143                __tmp.remaining(),
22144            )
22145        }
22146        __tmp.put_i32_le(self.latitude);
22147        __tmp.put_i32_le(self.longitude);
22148        __tmp.put_f32_le(self.altitude_barometric);
22149        __tmp.put_f32_le(self.altitude_geodetic);
22150        __tmp.put_f32_le(self.height);
22151        __tmp.put_f32_le(self.timestamp);
22152        __tmp.put_u16_le(self.direction);
22153        __tmp.put_u16_le(self.speed_horizontal);
22154        __tmp.put_i16_le(self.speed_vertical);
22155        __tmp.put_u8(self.target_system);
22156        __tmp.put_u8(self.target_component);
22157        for val in &self.id_or_mac {
22158            __tmp.put_u8(*val);
22159        }
22160        __tmp.put_u8(self.status as u8);
22161        __tmp.put_u8(self.height_reference as u8);
22162        __tmp.put_u8(self.horizontal_accuracy as u8);
22163        __tmp.put_u8(self.vertical_accuracy as u8);
22164        __tmp.put_u8(self.barometer_accuracy as u8);
22165        __tmp.put_u8(self.speed_accuracy as u8);
22166        __tmp.put_u8(self.timestamp_accuracy as u8);
22167        if matches!(version, MavlinkVersion::V2) {
22168            let len = __tmp.len();
22169            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22170        } else {
22171            __tmp.len()
22172        }
22173    }
22174}
22175#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
22176#[doc = ""]
22177#[doc = "ID: 12915"]
22178#[derive(Debug, Clone, PartialEq)]
22179#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22180#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22181#[cfg_attr(feature = "ts", derive(TS))]
22182#[cfg_attr(feature = "ts", ts(export))]
22183pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22184    #[doc = "System ID (0 for broadcast)."]
22185    pub target_system: u8,
22186    #[doc = "Component ID (0 for broadcast)."]
22187    pub target_component: u8,
22188    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22189    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22190    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22191    pub id_or_mac: [u8; 20],
22192    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
22193    pub single_message_size: u8,
22194    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
22195    pub msg_pack_size: u8,
22196    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
22197    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22198    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22199    pub messages: [u8; 225],
22200}
22201impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22202    pub const ENCODED_LEN: usize = 249usize;
22203    pub const DEFAULT: Self = Self {
22204        target_system: 0_u8,
22205        target_component: 0_u8,
22206        id_or_mac: [0_u8; 20usize],
22207        single_message_size: 0_u8,
22208        msg_pack_size: 0_u8,
22209        messages: [0_u8; 225usize],
22210    };
22211    #[cfg(feature = "arbitrary")]
22212    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22213        use arbitrary::{Arbitrary, Unstructured};
22214        let mut buf = [0u8; 1024];
22215        rng.fill_bytes(&mut buf);
22216        let mut unstructured = Unstructured::new(&buf);
22217        Self::arbitrary(&mut unstructured).unwrap_or_default()
22218    }
22219}
22220impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22221    fn default() -> Self {
22222        Self::DEFAULT.clone()
22223    }
22224}
22225impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22226    type Message = MavMessage;
22227    const ID: u32 = 12915u32;
22228    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
22229    const EXTRA_CRC: u8 = 94u8;
22230    const ENCODED_LEN: usize = 249usize;
22231    fn deser(
22232        _version: MavlinkVersion,
22233        __input: &[u8],
22234    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22235        let avail_len = __input.len();
22236        let mut payload_buf = [0; Self::ENCODED_LEN];
22237        let mut buf = if avail_len < Self::ENCODED_LEN {
22238            payload_buf[0..avail_len].copy_from_slice(__input);
22239            Bytes::new(&payload_buf)
22240        } else {
22241            Bytes::new(__input)
22242        };
22243        let mut __struct = Self::default();
22244        __struct.target_system = buf.get_u8();
22245        __struct.target_component = buf.get_u8();
22246        for v in &mut __struct.id_or_mac {
22247            let val = buf.get_u8();
22248            *v = val;
22249        }
22250        __struct.single_message_size = buf.get_u8();
22251        __struct.msg_pack_size = buf.get_u8();
22252        for v in &mut __struct.messages {
22253            let val = buf.get_u8();
22254            *v = val;
22255        }
22256        Ok(__struct)
22257    }
22258    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22259        let mut __tmp = BytesMut::new(bytes);
22260        #[allow(clippy::absurd_extreme_comparisons)]
22261        #[allow(unused_comparisons)]
22262        if __tmp.remaining() < Self::ENCODED_LEN {
22263            panic!(
22264                "buffer is too small (need {} bytes, but got {})",
22265                Self::ENCODED_LEN,
22266                __tmp.remaining(),
22267            )
22268        }
22269        __tmp.put_u8(self.target_system);
22270        __tmp.put_u8(self.target_component);
22271        for val in &self.id_or_mac {
22272            __tmp.put_u8(*val);
22273        }
22274        __tmp.put_u8(self.single_message_size);
22275        __tmp.put_u8(self.msg_pack_size);
22276        for val in &self.messages {
22277            __tmp.put_u8(*val);
22278        }
22279        if matches!(version, MavlinkVersion::V2) {
22280            let len = __tmp.len();
22281            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22282        } else {
22283            __tmp.len()
22284        }
22285    }
22286}
22287#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
22288#[doc = ""]
22289#[doc = "ID: 12905"]
22290#[derive(Debug, Clone, PartialEq)]
22291#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22292#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22293#[cfg_attr(feature = "ts", derive(TS))]
22294#[cfg_attr(feature = "ts", ts(export))]
22295pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
22296    #[doc = "System ID (0 for broadcast)."]
22297    pub target_system: u8,
22298    #[doc = "Component ID (0 for broadcast)."]
22299    pub target_component: u8,
22300    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22301    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22302    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22303    pub id_or_mac: [u8; 20],
22304    #[doc = "Indicates the type of the operator_id field."]
22305    pub operator_id_type: MavOdidOperatorIdType,
22306    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22307    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22308    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22309    pub operator_id: [u8; 20],
22310}
22311impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
22312    pub const ENCODED_LEN: usize = 43usize;
22313    pub const DEFAULT: Self = Self {
22314        target_system: 0_u8,
22315        target_component: 0_u8,
22316        id_or_mac: [0_u8; 20usize],
22317        operator_id_type: MavOdidOperatorIdType::DEFAULT,
22318        operator_id: [0_u8; 20usize],
22319    };
22320    #[cfg(feature = "arbitrary")]
22321    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22322        use arbitrary::{Arbitrary, Unstructured};
22323        let mut buf = [0u8; 1024];
22324        rng.fill_bytes(&mut buf);
22325        let mut unstructured = Unstructured::new(&buf);
22326        Self::arbitrary(&mut unstructured).unwrap_or_default()
22327    }
22328}
22329impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22330    fn default() -> Self {
22331        Self::DEFAULT.clone()
22332    }
22333}
22334impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22335    type Message = MavMessage;
22336    const ID: u32 = 12905u32;
22337    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
22338    const EXTRA_CRC: u8 = 49u8;
22339    const ENCODED_LEN: usize = 43usize;
22340    fn deser(
22341        _version: MavlinkVersion,
22342        __input: &[u8],
22343    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22344        let avail_len = __input.len();
22345        let mut payload_buf = [0; Self::ENCODED_LEN];
22346        let mut buf = if avail_len < Self::ENCODED_LEN {
22347            payload_buf[0..avail_len].copy_from_slice(__input);
22348            Bytes::new(&payload_buf)
22349        } else {
22350            Bytes::new(__input)
22351        };
22352        let mut __struct = Self::default();
22353        __struct.target_system = buf.get_u8();
22354        __struct.target_component = buf.get_u8();
22355        for v in &mut __struct.id_or_mac {
22356            let val = buf.get_u8();
22357            *v = val;
22358        }
22359        let tmp = buf.get_u8();
22360        __struct.operator_id_type =
22361            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22362                enum_type: "MavOdidOperatorIdType",
22363                value: tmp as u32,
22364            })?;
22365        for v in &mut __struct.operator_id {
22366            let val = buf.get_u8();
22367            *v = val;
22368        }
22369        Ok(__struct)
22370    }
22371    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22372        let mut __tmp = BytesMut::new(bytes);
22373        #[allow(clippy::absurd_extreme_comparisons)]
22374        #[allow(unused_comparisons)]
22375        if __tmp.remaining() < Self::ENCODED_LEN {
22376            panic!(
22377                "buffer is too small (need {} bytes, but got {})",
22378                Self::ENCODED_LEN,
22379                __tmp.remaining(),
22380            )
22381        }
22382        __tmp.put_u8(self.target_system);
22383        __tmp.put_u8(self.target_component);
22384        for val in &self.id_or_mac {
22385            __tmp.put_u8(*val);
22386        }
22387        __tmp.put_u8(self.operator_id_type as u8);
22388        for val in &self.operator_id {
22389            __tmp.put_u8(*val);
22390        }
22391        if matches!(version, MavlinkVersion::V2) {
22392            let len = __tmp.len();
22393            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22394        } else {
22395            __tmp.len()
22396        }
22397    }
22398}
22399#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
22400#[doc = ""]
22401#[doc = "ID: 12903"]
22402#[derive(Debug, Clone, PartialEq)]
22403#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22404#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22405#[cfg_attr(feature = "ts", derive(TS))]
22406#[cfg_attr(feature = "ts", ts(export))]
22407pub struct OPEN_DRONE_ID_SELF_ID_DATA {
22408    #[doc = "System ID (0 for broadcast)."]
22409    pub target_system: u8,
22410    #[doc = "Component ID (0 for broadcast)."]
22411    pub target_component: u8,
22412    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22413    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22414    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22415    pub id_or_mac: [u8; 20],
22416    #[doc = "Indicates the type of the description field."]
22417    pub description_type: MavOdidDescType,
22418    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22419    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22420    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22421    pub description: [u8; 23],
22422}
22423impl OPEN_DRONE_ID_SELF_ID_DATA {
22424    pub const ENCODED_LEN: usize = 46usize;
22425    pub const DEFAULT: Self = Self {
22426        target_system: 0_u8,
22427        target_component: 0_u8,
22428        id_or_mac: [0_u8; 20usize],
22429        description_type: MavOdidDescType::DEFAULT,
22430        description: [0_u8; 23usize],
22431    };
22432    #[cfg(feature = "arbitrary")]
22433    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22434        use arbitrary::{Arbitrary, Unstructured};
22435        let mut buf = [0u8; 1024];
22436        rng.fill_bytes(&mut buf);
22437        let mut unstructured = Unstructured::new(&buf);
22438        Self::arbitrary(&mut unstructured).unwrap_or_default()
22439    }
22440}
22441impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
22442    fn default() -> Self {
22443        Self::DEFAULT.clone()
22444    }
22445}
22446impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
22447    type Message = MavMessage;
22448    const ID: u32 = 12903u32;
22449    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
22450    const EXTRA_CRC: u8 = 249u8;
22451    const ENCODED_LEN: usize = 46usize;
22452    fn deser(
22453        _version: MavlinkVersion,
22454        __input: &[u8],
22455    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22456        let avail_len = __input.len();
22457        let mut payload_buf = [0; Self::ENCODED_LEN];
22458        let mut buf = if avail_len < Self::ENCODED_LEN {
22459            payload_buf[0..avail_len].copy_from_slice(__input);
22460            Bytes::new(&payload_buf)
22461        } else {
22462            Bytes::new(__input)
22463        };
22464        let mut __struct = Self::default();
22465        __struct.target_system = buf.get_u8();
22466        __struct.target_component = buf.get_u8();
22467        for v in &mut __struct.id_or_mac {
22468            let val = buf.get_u8();
22469            *v = val;
22470        }
22471        let tmp = buf.get_u8();
22472        __struct.description_type =
22473            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22474                enum_type: "MavOdidDescType",
22475                value: tmp as u32,
22476            })?;
22477        for v in &mut __struct.description {
22478            let val = buf.get_u8();
22479            *v = val;
22480        }
22481        Ok(__struct)
22482    }
22483    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22484        let mut __tmp = BytesMut::new(bytes);
22485        #[allow(clippy::absurd_extreme_comparisons)]
22486        #[allow(unused_comparisons)]
22487        if __tmp.remaining() < Self::ENCODED_LEN {
22488            panic!(
22489                "buffer is too small (need {} bytes, but got {})",
22490                Self::ENCODED_LEN,
22491                __tmp.remaining(),
22492            )
22493        }
22494        __tmp.put_u8(self.target_system);
22495        __tmp.put_u8(self.target_component);
22496        for val in &self.id_or_mac {
22497            __tmp.put_u8(*val);
22498        }
22499        __tmp.put_u8(self.description_type as u8);
22500        for val in &self.description {
22501            __tmp.put_u8(*val);
22502        }
22503        if matches!(version, MavlinkVersion::V2) {
22504            let len = __tmp.len();
22505            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22506        } else {
22507            __tmp.len()
22508        }
22509    }
22510}
22511#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
22512#[doc = ""]
22513#[doc = "ID: 12904"]
22514#[derive(Debug, Clone, PartialEq)]
22515#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22516#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22517#[cfg_attr(feature = "ts", derive(TS))]
22518#[cfg_attr(feature = "ts", ts(export))]
22519pub struct OPEN_DRONE_ID_SYSTEM_DATA {
22520    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22521    pub operator_latitude: i32,
22522    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22523    pub operator_longitude: i32,
22524    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22525    pub area_ceiling: f32,
22526    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22527    pub area_floor: f32,
22528    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22529    pub operator_altitude_geo: f32,
22530    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22531    pub timestamp: u32,
22532    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
22533    pub area_count: u16,
22534    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
22535    pub area_radius: u16,
22536    #[doc = "System ID (0 for broadcast)."]
22537    pub target_system: u8,
22538    #[doc = "Component ID (0 for broadcast)."]
22539    pub target_component: u8,
22540    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22541    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22542    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22543    pub id_or_mac: [u8; 20],
22544    #[doc = "Specifies the operator location type."]
22545    pub operator_location_type: MavOdidOperatorLocationType,
22546    #[doc = "Specifies the classification type of the UA."]
22547    pub classification_type: MavOdidClassificationType,
22548    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
22549    pub category_eu: MavOdidCategoryEu,
22550    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
22551    pub class_eu: MavOdidClassEu,
22552}
22553impl OPEN_DRONE_ID_SYSTEM_DATA {
22554    pub const ENCODED_LEN: usize = 54usize;
22555    pub const DEFAULT: Self = Self {
22556        operator_latitude: 0_i32,
22557        operator_longitude: 0_i32,
22558        area_ceiling: 0.0_f32,
22559        area_floor: 0.0_f32,
22560        operator_altitude_geo: 0.0_f32,
22561        timestamp: 0_u32,
22562        area_count: 0_u16,
22563        area_radius: 0_u16,
22564        target_system: 0_u8,
22565        target_component: 0_u8,
22566        id_or_mac: [0_u8; 20usize],
22567        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
22568        classification_type: MavOdidClassificationType::DEFAULT,
22569        category_eu: MavOdidCategoryEu::DEFAULT,
22570        class_eu: MavOdidClassEu::DEFAULT,
22571    };
22572    #[cfg(feature = "arbitrary")]
22573    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22574        use arbitrary::{Arbitrary, Unstructured};
22575        let mut buf = [0u8; 1024];
22576        rng.fill_bytes(&mut buf);
22577        let mut unstructured = Unstructured::new(&buf);
22578        Self::arbitrary(&mut unstructured).unwrap_or_default()
22579    }
22580}
22581impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
22582    fn default() -> Self {
22583        Self::DEFAULT.clone()
22584    }
22585}
22586impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
22587    type Message = MavMessage;
22588    const ID: u32 = 12904u32;
22589    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
22590    const EXTRA_CRC: u8 = 77u8;
22591    const ENCODED_LEN: usize = 54usize;
22592    fn deser(
22593        _version: MavlinkVersion,
22594        __input: &[u8],
22595    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22596        let avail_len = __input.len();
22597        let mut payload_buf = [0; Self::ENCODED_LEN];
22598        let mut buf = if avail_len < Self::ENCODED_LEN {
22599            payload_buf[0..avail_len].copy_from_slice(__input);
22600            Bytes::new(&payload_buf)
22601        } else {
22602            Bytes::new(__input)
22603        };
22604        let mut __struct = Self::default();
22605        __struct.operator_latitude = buf.get_i32_le();
22606        __struct.operator_longitude = buf.get_i32_le();
22607        __struct.area_ceiling = buf.get_f32_le();
22608        __struct.area_floor = buf.get_f32_le();
22609        __struct.operator_altitude_geo = buf.get_f32_le();
22610        __struct.timestamp = buf.get_u32_le();
22611        __struct.area_count = buf.get_u16_le();
22612        __struct.area_radius = buf.get_u16_le();
22613        __struct.target_system = buf.get_u8();
22614        __struct.target_component = buf.get_u8();
22615        for v in &mut __struct.id_or_mac {
22616            let val = buf.get_u8();
22617            *v = val;
22618        }
22619        let tmp = buf.get_u8();
22620        __struct.operator_location_type =
22621            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22622                enum_type: "MavOdidOperatorLocationType",
22623                value: tmp as u32,
22624            })?;
22625        let tmp = buf.get_u8();
22626        __struct.classification_type =
22627            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22628                enum_type: "MavOdidClassificationType",
22629                value: tmp as u32,
22630            })?;
22631        let tmp = buf.get_u8();
22632        __struct.category_eu =
22633            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22634                enum_type: "MavOdidCategoryEu",
22635                value: tmp as u32,
22636            })?;
22637        let tmp = buf.get_u8();
22638        __struct.class_eu =
22639            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22640                enum_type: "MavOdidClassEu",
22641                value: tmp as u32,
22642            })?;
22643        Ok(__struct)
22644    }
22645    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22646        let mut __tmp = BytesMut::new(bytes);
22647        #[allow(clippy::absurd_extreme_comparisons)]
22648        #[allow(unused_comparisons)]
22649        if __tmp.remaining() < Self::ENCODED_LEN {
22650            panic!(
22651                "buffer is too small (need {} bytes, but got {})",
22652                Self::ENCODED_LEN,
22653                __tmp.remaining(),
22654            )
22655        }
22656        __tmp.put_i32_le(self.operator_latitude);
22657        __tmp.put_i32_le(self.operator_longitude);
22658        __tmp.put_f32_le(self.area_ceiling);
22659        __tmp.put_f32_le(self.area_floor);
22660        __tmp.put_f32_le(self.operator_altitude_geo);
22661        __tmp.put_u32_le(self.timestamp);
22662        __tmp.put_u16_le(self.area_count);
22663        __tmp.put_u16_le(self.area_radius);
22664        __tmp.put_u8(self.target_system);
22665        __tmp.put_u8(self.target_component);
22666        for val in &self.id_or_mac {
22667            __tmp.put_u8(*val);
22668        }
22669        __tmp.put_u8(self.operator_location_type as u8);
22670        __tmp.put_u8(self.classification_type as u8);
22671        __tmp.put_u8(self.category_eu as u8);
22672        __tmp.put_u8(self.class_eu as u8);
22673        if matches!(version, MavlinkVersion::V2) {
22674            let len = __tmp.len();
22675            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22676        } else {
22677            __tmp.len()
22678        }
22679    }
22680}
22681#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
22682#[doc = ""]
22683#[doc = "ID: 12919"]
22684#[derive(Debug, Clone, PartialEq)]
22685#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22686#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22687#[cfg_attr(feature = "ts", derive(TS))]
22688#[cfg_attr(feature = "ts", ts(export))]
22689pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22690    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22691    pub operator_latitude: i32,
22692    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22693    pub operator_longitude: i32,
22694    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22695    pub operator_altitude_geo: f32,
22696    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22697    pub timestamp: u32,
22698    #[doc = "System ID (0 for broadcast)."]
22699    pub target_system: u8,
22700    #[doc = "Component ID (0 for broadcast)."]
22701    pub target_component: u8,
22702}
22703impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22704    pub const ENCODED_LEN: usize = 18usize;
22705    pub const DEFAULT: Self = Self {
22706        operator_latitude: 0_i32,
22707        operator_longitude: 0_i32,
22708        operator_altitude_geo: 0.0_f32,
22709        timestamp: 0_u32,
22710        target_system: 0_u8,
22711        target_component: 0_u8,
22712    };
22713    #[cfg(feature = "arbitrary")]
22714    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22715        use arbitrary::{Arbitrary, Unstructured};
22716        let mut buf = [0u8; 1024];
22717        rng.fill_bytes(&mut buf);
22718        let mut unstructured = Unstructured::new(&buf);
22719        Self::arbitrary(&mut unstructured).unwrap_or_default()
22720    }
22721}
22722impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22723    fn default() -> Self {
22724        Self::DEFAULT.clone()
22725    }
22726}
22727impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22728    type Message = MavMessage;
22729    const ID: u32 = 12919u32;
22730    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
22731    const EXTRA_CRC: u8 = 7u8;
22732    const ENCODED_LEN: usize = 18usize;
22733    fn deser(
22734        _version: MavlinkVersion,
22735        __input: &[u8],
22736    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22737        let avail_len = __input.len();
22738        let mut payload_buf = [0; Self::ENCODED_LEN];
22739        let mut buf = if avail_len < Self::ENCODED_LEN {
22740            payload_buf[0..avail_len].copy_from_slice(__input);
22741            Bytes::new(&payload_buf)
22742        } else {
22743            Bytes::new(__input)
22744        };
22745        let mut __struct = Self::default();
22746        __struct.operator_latitude = buf.get_i32_le();
22747        __struct.operator_longitude = buf.get_i32_le();
22748        __struct.operator_altitude_geo = buf.get_f32_le();
22749        __struct.timestamp = buf.get_u32_le();
22750        __struct.target_system = buf.get_u8();
22751        __struct.target_component = buf.get_u8();
22752        Ok(__struct)
22753    }
22754    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22755        let mut __tmp = BytesMut::new(bytes);
22756        #[allow(clippy::absurd_extreme_comparisons)]
22757        #[allow(unused_comparisons)]
22758        if __tmp.remaining() < Self::ENCODED_LEN {
22759            panic!(
22760                "buffer is too small (need {} bytes, but got {})",
22761                Self::ENCODED_LEN,
22762                __tmp.remaining(),
22763            )
22764        }
22765        __tmp.put_i32_le(self.operator_latitude);
22766        __tmp.put_i32_le(self.operator_longitude);
22767        __tmp.put_f32_le(self.operator_altitude_geo);
22768        __tmp.put_u32_le(self.timestamp);
22769        __tmp.put_u8(self.target_system);
22770        __tmp.put_u8(self.target_component);
22771        if matches!(version, MavlinkVersion::V2) {
22772            let len = __tmp.len();
22773            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22774        } else {
22775            __tmp.len()
22776        }
22777    }
22778}
22779#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
22780#[doc = ""]
22781#[doc = "ID: 100"]
22782#[derive(Debug, Clone, PartialEq)]
22783#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22784#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22785#[cfg_attr(feature = "ts", derive(TS))]
22786#[cfg_attr(feature = "ts", ts(export))]
22787pub struct OPTICAL_FLOW_DATA {
22788    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22789    pub time_usec: u64,
22790    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
22791    pub flow_comp_m_x: f32,
22792    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
22793    pub flow_comp_m_y: f32,
22794    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
22795    pub ground_distance: f32,
22796    #[doc = "Flow in x-sensor direction"]
22797    pub flow_x: i16,
22798    #[doc = "Flow in y-sensor direction"]
22799    pub flow_y: i16,
22800    #[doc = "Sensor ID"]
22801    pub sensor_id: u8,
22802    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
22803    pub quality: u8,
22804    #[doc = "Flow rate about X axis"]
22805    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22806    pub flow_rate_x: f32,
22807    #[doc = "Flow rate about Y axis"]
22808    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22809    pub flow_rate_y: f32,
22810}
22811impl OPTICAL_FLOW_DATA {
22812    pub const ENCODED_LEN: usize = 34usize;
22813    pub const DEFAULT: Self = Self {
22814        time_usec: 0_u64,
22815        flow_comp_m_x: 0.0_f32,
22816        flow_comp_m_y: 0.0_f32,
22817        ground_distance: 0.0_f32,
22818        flow_x: 0_i16,
22819        flow_y: 0_i16,
22820        sensor_id: 0_u8,
22821        quality: 0_u8,
22822        flow_rate_x: 0.0_f32,
22823        flow_rate_y: 0.0_f32,
22824    };
22825    #[cfg(feature = "arbitrary")]
22826    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22827        use arbitrary::{Arbitrary, Unstructured};
22828        let mut buf = [0u8; 1024];
22829        rng.fill_bytes(&mut buf);
22830        let mut unstructured = Unstructured::new(&buf);
22831        Self::arbitrary(&mut unstructured).unwrap_or_default()
22832    }
22833}
22834impl Default for OPTICAL_FLOW_DATA {
22835    fn default() -> Self {
22836        Self::DEFAULT.clone()
22837    }
22838}
22839impl MessageData for OPTICAL_FLOW_DATA {
22840    type Message = MavMessage;
22841    const ID: u32 = 100u32;
22842    const NAME: &'static str = "OPTICAL_FLOW";
22843    const EXTRA_CRC: u8 = 175u8;
22844    const ENCODED_LEN: usize = 34usize;
22845    fn deser(
22846        _version: MavlinkVersion,
22847        __input: &[u8],
22848    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22849        let avail_len = __input.len();
22850        let mut payload_buf = [0; Self::ENCODED_LEN];
22851        let mut buf = if avail_len < Self::ENCODED_LEN {
22852            payload_buf[0..avail_len].copy_from_slice(__input);
22853            Bytes::new(&payload_buf)
22854        } else {
22855            Bytes::new(__input)
22856        };
22857        let mut __struct = Self::default();
22858        __struct.time_usec = buf.get_u64_le();
22859        __struct.flow_comp_m_x = buf.get_f32_le();
22860        __struct.flow_comp_m_y = buf.get_f32_le();
22861        __struct.ground_distance = buf.get_f32_le();
22862        __struct.flow_x = buf.get_i16_le();
22863        __struct.flow_y = buf.get_i16_le();
22864        __struct.sensor_id = buf.get_u8();
22865        __struct.quality = buf.get_u8();
22866        __struct.flow_rate_x = buf.get_f32_le();
22867        __struct.flow_rate_y = buf.get_f32_le();
22868        Ok(__struct)
22869    }
22870    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22871        let mut __tmp = BytesMut::new(bytes);
22872        #[allow(clippy::absurd_extreme_comparisons)]
22873        #[allow(unused_comparisons)]
22874        if __tmp.remaining() < Self::ENCODED_LEN {
22875            panic!(
22876                "buffer is too small (need {} bytes, but got {})",
22877                Self::ENCODED_LEN,
22878                __tmp.remaining(),
22879            )
22880        }
22881        __tmp.put_u64_le(self.time_usec);
22882        __tmp.put_f32_le(self.flow_comp_m_x);
22883        __tmp.put_f32_le(self.flow_comp_m_y);
22884        __tmp.put_f32_le(self.ground_distance);
22885        __tmp.put_i16_le(self.flow_x);
22886        __tmp.put_i16_le(self.flow_y);
22887        __tmp.put_u8(self.sensor_id);
22888        __tmp.put_u8(self.quality);
22889        if matches!(version, MavlinkVersion::V2) {
22890            __tmp.put_f32_le(self.flow_rate_x);
22891            __tmp.put_f32_le(self.flow_rate_y);
22892            let len = __tmp.len();
22893            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22894        } else {
22895            __tmp.len()
22896        }
22897    }
22898}
22899#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
22900#[doc = ""]
22901#[doc = "ID: 106"]
22902#[derive(Debug, Clone, PartialEq)]
22903#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22904#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22905#[cfg_attr(feature = "ts", derive(TS))]
22906#[cfg_attr(feature = "ts", ts(export))]
22907pub struct OPTICAL_FLOW_RAD_DATA {
22908    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22909    pub time_usec: u64,
22910    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
22911    pub integration_time_us: u32,
22912    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
22913    pub integrated_x: f32,
22914    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
22915    pub integrated_y: f32,
22916    #[doc = "RH rotation around X axis"]
22917    pub integrated_xgyro: f32,
22918    #[doc = "RH rotation around Y axis"]
22919    pub integrated_ygyro: f32,
22920    #[doc = "RH rotation around Z axis"]
22921    pub integrated_zgyro: f32,
22922    #[doc = "Time since the distance was sampled."]
22923    pub time_delta_distance_us: u32,
22924    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
22925    pub distance: f32,
22926    #[doc = "Temperature"]
22927    pub temperature: i16,
22928    #[doc = "Sensor ID"]
22929    pub sensor_id: u8,
22930    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
22931    pub quality: u8,
22932}
22933impl OPTICAL_FLOW_RAD_DATA {
22934    pub const ENCODED_LEN: usize = 44usize;
22935    pub const DEFAULT: Self = Self {
22936        time_usec: 0_u64,
22937        integration_time_us: 0_u32,
22938        integrated_x: 0.0_f32,
22939        integrated_y: 0.0_f32,
22940        integrated_xgyro: 0.0_f32,
22941        integrated_ygyro: 0.0_f32,
22942        integrated_zgyro: 0.0_f32,
22943        time_delta_distance_us: 0_u32,
22944        distance: 0.0_f32,
22945        temperature: 0_i16,
22946        sensor_id: 0_u8,
22947        quality: 0_u8,
22948    };
22949    #[cfg(feature = "arbitrary")]
22950    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22951        use arbitrary::{Arbitrary, Unstructured};
22952        let mut buf = [0u8; 1024];
22953        rng.fill_bytes(&mut buf);
22954        let mut unstructured = Unstructured::new(&buf);
22955        Self::arbitrary(&mut unstructured).unwrap_or_default()
22956    }
22957}
22958impl Default for OPTICAL_FLOW_RAD_DATA {
22959    fn default() -> Self {
22960        Self::DEFAULT.clone()
22961    }
22962}
22963impl MessageData for OPTICAL_FLOW_RAD_DATA {
22964    type Message = MavMessage;
22965    const ID: u32 = 106u32;
22966    const NAME: &'static str = "OPTICAL_FLOW_RAD";
22967    const EXTRA_CRC: u8 = 138u8;
22968    const ENCODED_LEN: usize = 44usize;
22969    fn deser(
22970        _version: MavlinkVersion,
22971        __input: &[u8],
22972    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22973        let avail_len = __input.len();
22974        let mut payload_buf = [0; Self::ENCODED_LEN];
22975        let mut buf = if avail_len < Self::ENCODED_LEN {
22976            payload_buf[0..avail_len].copy_from_slice(__input);
22977            Bytes::new(&payload_buf)
22978        } else {
22979            Bytes::new(__input)
22980        };
22981        let mut __struct = Self::default();
22982        __struct.time_usec = buf.get_u64_le();
22983        __struct.integration_time_us = buf.get_u32_le();
22984        __struct.integrated_x = buf.get_f32_le();
22985        __struct.integrated_y = buf.get_f32_le();
22986        __struct.integrated_xgyro = buf.get_f32_le();
22987        __struct.integrated_ygyro = buf.get_f32_le();
22988        __struct.integrated_zgyro = buf.get_f32_le();
22989        __struct.time_delta_distance_us = buf.get_u32_le();
22990        __struct.distance = buf.get_f32_le();
22991        __struct.temperature = buf.get_i16_le();
22992        __struct.sensor_id = buf.get_u8();
22993        __struct.quality = buf.get_u8();
22994        Ok(__struct)
22995    }
22996    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22997        let mut __tmp = BytesMut::new(bytes);
22998        #[allow(clippy::absurd_extreme_comparisons)]
22999        #[allow(unused_comparisons)]
23000        if __tmp.remaining() < Self::ENCODED_LEN {
23001            panic!(
23002                "buffer is too small (need {} bytes, but got {})",
23003                Self::ENCODED_LEN,
23004                __tmp.remaining(),
23005            )
23006        }
23007        __tmp.put_u64_le(self.time_usec);
23008        __tmp.put_u32_le(self.integration_time_us);
23009        __tmp.put_f32_le(self.integrated_x);
23010        __tmp.put_f32_le(self.integrated_y);
23011        __tmp.put_f32_le(self.integrated_xgyro);
23012        __tmp.put_f32_le(self.integrated_ygyro);
23013        __tmp.put_f32_le(self.integrated_zgyro);
23014        __tmp.put_u32_le(self.time_delta_distance_us);
23015        __tmp.put_f32_le(self.distance);
23016        __tmp.put_i16_le(self.temperature);
23017        __tmp.put_u8(self.sensor_id);
23018        __tmp.put_u8(self.quality);
23019        if matches!(version, MavlinkVersion::V2) {
23020            let len = __tmp.len();
23021            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23022        } else {
23023            __tmp.len()
23024        }
23025    }
23026}
23027#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
23028#[doc = ""]
23029#[doc = "ID: 360"]
23030#[derive(Debug, Clone, PartialEq)]
23031#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23032#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23033#[cfg_attr(feature = "ts", derive(TS))]
23034#[cfg_attr(feature = "ts", ts(export))]
23035pub struct ORBIT_EXECUTION_STATUS_DATA {
23036    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23037    pub time_usec: u64,
23038    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
23039    pub radius: f32,
23040    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23041    pub x: i32,
23042    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23043    pub y: i32,
23044    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
23045    pub z: f32,
23046    #[doc = "The coordinate system of the fields: x, y, z."]
23047    pub frame: MavFrame,
23048}
23049impl ORBIT_EXECUTION_STATUS_DATA {
23050    pub const ENCODED_LEN: usize = 25usize;
23051    pub const DEFAULT: Self = Self {
23052        time_usec: 0_u64,
23053        radius: 0.0_f32,
23054        x: 0_i32,
23055        y: 0_i32,
23056        z: 0.0_f32,
23057        frame: MavFrame::DEFAULT,
23058    };
23059    #[cfg(feature = "arbitrary")]
23060    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23061        use arbitrary::{Arbitrary, Unstructured};
23062        let mut buf = [0u8; 1024];
23063        rng.fill_bytes(&mut buf);
23064        let mut unstructured = Unstructured::new(&buf);
23065        Self::arbitrary(&mut unstructured).unwrap_or_default()
23066    }
23067}
23068impl Default for ORBIT_EXECUTION_STATUS_DATA {
23069    fn default() -> Self {
23070        Self::DEFAULT.clone()
23071    }
23072}
23073impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
23074    type Message = MavMessage;
23075    const ID: u32 = 360u32;
23076    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
23077    const EXTRA_CRC: u8 = 11u8;
23078    const ENCODED_LEN: usize = 25usize;
23079    fn deser(
23080        _version: MavlinkVersion,
23081        __input: &[u8],
23082    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23083        let avail_len = __input.len();
23084        let mut payload_buf = [0; Self::ENCODED_LEN];
23085        let mut buf = if avail_len < Self::ENCODED_LEN {
23086            payload_buf[0..avail_len].copy_from_slice(__input);
23087            Bytes::new(&payload_buf)
23088        } else {
23089            Bytes::new(__input)
23090        };
23091        let mut __struct = Self::default();
23092        __struct.time_usec = buf.get_u64_le();
23093        __struct.radius = buf.get_f32_le();
23094        __struct.x = buf.get_i32_le();
23095        __struct.y = buf.get_i32_le();
23096        __struct.z = buf.get_f32_le();
23097        let tmp = buf.get_u8();
23098        __struct.frame =
23099            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23100                enum_type: "MavFrame",
23101                value: tmp as u32,
23102            })?;
23103        Ok(__struct)
23104    }
23105    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23106        let mut __tmp = BytesMut::new(bytes);
23107        #[allow(clippy::absurd_extreme_comparisons)]
23108        #[allow(unused_comparisons)]
23109        if __tmp.remaining() < Self::ENCODED_LEN {
23110            panic!(
23111                "buffer is too small (need {} bytes, but got {})",
23112                Self::ENCODED_LEN,
23113                __tmp.remaining(),
23114            )
23115        }
23116        __tmp.put_u64_le(self.time_usec);
23117        __tmp.put_f32_le(self.radius);
23118        __tmp.put_i32_le(self.x);
23119        __tmp.put_i32_le(self.y);
23120        __tmp.put_f32_le(self.z);
23121        __tmp.put_u8(self.frame as u8);
23122        if matches!(version, MavlinkVersion::V2) {
23123            let len = __tmp.len();
23124            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23125        } else {
23126            __tmp.len()
23127        }
23128    }
23129}
23130#[doc = "Response from a PARAM_EXT_SET message."]
23131#[doc = ""]
23132#[doc = "ID: 324"]
23133#[derive(Debug, Clone, PartialEq)]
23134#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23135#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23136#[cfg_attr(feature = "ts", derive(TS))]
23137#[cfg_attr(feature = "ts", ts(export))]
23138pub struct PARAM_EXT_ACK_DATA {
23139    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23140    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23141    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23142    pub param_id: [u8; 16],
23143    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
23144    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23145    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23146    pub param_value: [u8; 128],
23147    #[doc = "Parameter type."]
23148    pub param_type: MavParamExtType,
23149    #[doc = "Result code."]
23150    pub param_result: ParamAck,
23151}
23152impl PARAM_EXT_ACK_DATA {
23153    pub const ENCODED_LEN: usize = 146usize;
23154    pub const DEFAULT: Self = Self {
23155        param_id: [0_u8; 16usize],
23156        param_value: [0_u8; 128usize],
23157        param_type: MavParamExtType::DEFAULT,
23158        param_result: ParamAck::DEFAULT,
23159    };
23160    #[cfg(feature = "arbitrary")]
23161    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23162        use arbitrary::{Arbitrary, Unstructured};
23163        let mut buf = [0u8; 1024];
23164        rng.fill_bytes(&mut buf);
23165        let mut unstructured = Unstructured::new(&buf);
23166        Self::arbitrary(&mut unstructured).unwrap_or_default()
23167    }
23168}
23169impl Default for PARAM_EXT_ACK_DATA {
23170    fn default() -> Self {
23171        Self::DEFAULT.clone()
23172    }
23173}
23174impl MessageData for PARAM_EXT_ACK_DATA {
23175    type Message = MavMessage;
23176    const ID: u32 = 324u32;
23177    const NAME: &'static str = "PARAM_EXT_ACK";
23178    const EXTRA_CRC: u8 = 132u8;
23179    const ENCODED_LEN: usize = 146usize;
23180    fn deser(
23181        _version: MavlinkVersion,
23182        __input: &[u8],
23183    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23184        let avail_len = __input.len();
23185        let mut payload_buf = [0; Self::ENCODED_LEN];
23186        let mut buf = if avail_len < Self::ENCODED_LEN {
23187            payload_buf[0..avail_len].copy_from_slice(__input);
23188            Bytes::new(&payload_buf)
23189        } else {
23190            Bytes::new(__input)
23191        };
23192        let mut __struct = Self::default();
23193        for v in &mut __struct.param_id {
23194            let val = buf.get_u8();
23195            *v = val;
23196        }
23197        for v in &mut __struct.param_value {
23198            let val = buf.get_u8();
23199            *v = val;
23200        }
23201        let tmp = buf.get_u8();
23202        __struct.param_type =
23203            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23204                enum_type: "MavParamExtType",
23205                value: tmp as u32,
23206            })?;
23207        let tmp = buf.get_u8();
23208        __struct.param_result =
23209            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23210                enum_type: "ParamAck",
23211                value: tmp as u32,
23212            })?;
23213        Ok(__struct)
23214    }
23215    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23216        let mut __tmp = BytesMut::new(bytes);
23217        #[allow(clippy::absurd_extreme_comparisons)]
23218        #[allow(unused_comparisons)]
23219        if __tmp.remaining() < Self::ENCODED_LEN {
23220            panic!(
23221                "buffer is too small (need {} bytes, but got {})",
23222                Self::ENCODED_LEN,
23223                __tmp.remaining(),
23224            )
23225        }
23226        for val in &self.param_id {
23227            __tmp.put_u8(*val);
23228        }
23229        for val in &self.param_value {
23230            __tmp.put_u8(*val);
23231        }
23232        __tmp.put_u8(self.param_type as u8);
23233        __tmp.put_u8(self.param_result as u8);
23234        if matches!(version, MavlinkVersion::V2) {
23235            let len = __tmp.len();
23236            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23237        } else {
23238            __tmp.len()
23239        }
23240    }
23241}
23242#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
23243#[doc = ""]
23244#[doc = "ID: 321"]
23245#[derive(Debug, Clone, PartialEq)]
23246#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23248#[cfg_attr(feature = "ts", derive(TS))]
23249#[cfg_attr(feature = "ts", ts(export))]
23250pub struct PARAM_EXT_REQUEST_LIST_DATA {
23251    #[doc = "System ID"]
23252    pub target_system: u8,
23253    #[doc = "Component ID"]
23254    pub target_component: u8,
23255}
23256impl PARAM_EXT_REQUEST_LIST_DATA {
23257    pub const ENCODED_LEN: usize = 2usize;
23258    pub const DEFAULT: Self = Self {
23259        target_system: 0_u8,
23260        target_component: 0_u8,
23261    };
23262    #[cfg(feature = "arbitrary")]
23263    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23264        use arbitrary::{Arbitrary, Unstructured};
23265        let mut buf = [0u8; 1024];
23266        rng.fill_bytes(&mut buf);
23267        let mut unstructured = Unstructured::new(&buf);
23268        Self::arbitrary(&mut unstructured).unwrap_or_default()
23269    }
23270}
23271impl Default for PARAM_EXT_REQUEST_LIST_DATA {
23272    fn default() -> Self {
23273        Self::DEFAULT.clone()
23274    }
23275}
23276impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
23277    type Message = MavMessage;
23278    const ID: u32 = 321u32;
23279    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
23280    const EXTRA_CRC: u8 = 88u8;
23281    const ENCODED_LEN: usize = 2usize;
23282    fn deser(
23283        _version: MavlinkVersion,
23284        __input: &[u8],
23285    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23286        let avail_len = __input.len();
23287        let mut payload_buf = [0; Self::ENCODED_LEN];
23288        let mut buf = if avail_len < Self::ENCODED_LEN {
23289            payload_buf[0..avail_len].copy_from_slice(__input);
23290            Bytes::new(&payload_buf)
23291        } else {
23292            Bytes::new(__input)
23293        };
23294        let mut __struct = Self::default();
23295        __struct.target_system = buf.get_u8();
23296        __struct.target_component = buf.get_u8();
23297        Ok(__struct)
23298    }
23299    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23300        let mut __tmp = BytesMut::new(bytes);
23301        #[allow(clippy::absurd_extreme_comparisons)]
23302        #[allow(unused_comparisons)]
23303        if __tmp.remaining() < Self::ENCODED_LEN {
23304            panic!(
23305                "buffer is too small (need {} bytes, but got {})",
23306                Self::ENCODED_LEN,
23307                __tmp.remaining(),
23308            )
23309        }
23310        __tmp.put_u8(self.target_system);
23311        __tmp.put_u8(self.target_component);
23312        if matches!(version, MavlinkVersion::V2) {
23313            let len = __tmp.len();
23314            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23315        } else {
23316            __tmp.len()
23317        }
23318    }
23319}
23320#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
23321#[doc = ""]
23322#[doc = "ID: 320"]
23323#[derive(Debug, Clone, PartialEq)]
23324#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23325#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23326#[cfg_attr(feature = "ts", derive(TS))]
23327#[cfg_attr(feature = "ts", ts(export))]
23328pub struct PARAM_EXT_REQUEST_READ_DATA {
23329    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
23330    pub param_index: i16,
23331    #[doc = "System ID"]
23332    pub target_system: u8,
23333    #[doc = "Component ID"]
23334    pub target_component: u8,
23335    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23336    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23337    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23338    pub param_id: [u8; 16],
23339}
23340impl PARAM_EXT_REQUEST_READ_DATA {
23341    pub const ENCODED_LEN: usize = 20usize;
23342    pub const DEFAULT: Self = Self {
23343        param_index: 0_i16,
23344        target_system: 0_u8,
23345        target_component: 0_u8,
23346        param_id: [0_u8; 16usize],
23347    };
23348    #[cfg(feature = "arbitrary")]
23349    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23350        use arbitrary::{Arbitrary, Unstructured};
23351        let mut buf = [0u8; 1024];
23352        rng.fill_bytes(&mut buf);
23353        let mut unstructured = Unstructured::new(&buf);
23354        Self::arbitrary(&mut unstructured).unwrap_or_default()
23355    }
23356}
23357impl Default for PARAM_EXT_REQUEST_READ_DATA {
23358    fn default() -> Self {
23359        Self::DEFAULT.clone()
23360    }
23361}
23362impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
23363    type Message = MavMessage;
23364    const ID: u32 = 320u32;
23365    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
23366    const EXTRA_CRC: u8 = 243u8;
23367    const ENCODED_LEN: usize = 20usize;
23368    fn deser(
23369        _version: MavlinkVersion,
23370        __input: &[u8],
23371    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23372        let avail_len = __input.len();
23373        let mut payload_buf = [0; Self::ENCODED_LEN];
23374        let mut buf = if avail_len < Self::ENCODED_LEN {
23375            payload_buf[0..avail_len].copy_from_slice(__input);
23376            Bytes::new(&payload_buf)
23377        } else {
23378            Bytes::new(__input)
23379        };
23380        let mut __struct = Self::default();
23381        __struct.param_index = buf.get_i16_le();
23382        __struct.target_system = buf.get_u8();
23383        __struct.target_component = buf.get_u8();
23384        for v in &mut __struct.param_id {
23385            let val = buf.get_u8();
23386            *v = val;
23387        }
23388        Ok(__struct)
23389    }
23390    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23391        let mut __tmp = BytesMut::new(bytes);
23392        #[allow(clippy::absurd_extreme_comparisons)]
23393        #[allow(unused_comparisons)]
23394        if __tmp.remaining() < Self::ENCODED_LEN {
23395            panic!(
23396                "buffer is too small (need {} bytes, but got {})",
23397                Self::ENCODED_LEN,
23398                __tmp.remaining(),
23399            )
23400        }
23401        __tmp.put_i16_le(self.param_index);
23402        __tmp.put_u8(self.target_system);
23403        __tmp.put_u8(self.target_component);
23404        for val in &self.param_id {
23405            __tmp.put_u8(*val);
23406        }
23407        if matches!(version, MavlinkVersion::V2) {
23408            let len = __tmp.len();
23409            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23410        } else {
23411            __tmp.len()
23412        }
23413    }
23414}
23415#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
23416#[doc = ""]
23417#[doc = "ID: 323"]
23418#[derive(Debug, Clone, PartialEq)]
23419#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23420#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23421#[cfg_attr(feature = "ts", derive(TS))]
23422#[cfg_attr(feature = "ts", ts(export))]
23423pub struct PARAM_EXT_SET_DATA {
23424    #[doc = "System ID"]
23425    pub target_system: u8,
23426    #[doc = "Component ID"]
23427    pub target_component: u8,
23428    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23429    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23430    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23431    pub param_id: [u8; 16],
23432    #[doc = "Parameter value"]
23433    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23434    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23435    pub param_value: [u8; 128],
23436    #[doc = "Parameter type."]
23437    pub param_type: MavParamExtType,
23438}
23439impl PARAM_EXT_SET_DATA {
23440    pub const ENCODED_LEN: usize = 147usize;
23441    pub const DEFAULT: Self = Self {
23442        target_system: 0_u8,
23443        target_component: 0_u8,
23444        param_id: [0_u8; 16usize],
23445        param_value: [0_u8; 128usize],
23446        param_type: MavParamExtType::DEFAULT,
23447    };
23448    #[cfg(feature = "arbitrary")]
23449    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23450        use arbitrary::{Arbitrary, Unstructured};
23451        let mut buf = [0u8; 1024];
23452        rng.fill_bytes(&mut buf);
23453        let mut unstructured = Unstructured::new(&buf);
23454        Self::arbitrary(&mut unstructured).unwrap_or_default()
23455    }
23456}
23457impl Default for PARAM_EXT_SET_DATA {
23458    fn default() -> Self {
23459        Self::DEFAULT.clone()
23460    }
23461}
23462impl MessageData for PARAM_EXT_SET_DATA {
23463    type Message = MavMessage;
23464    const ID: u32 = 323u32;
23465    const NAME: &'static str = "PARAM_EXT_SET";
23466    const EXTRA_CRC: u8 = 78u8;
23467    const ENCODED_LEN: usize = 147usize;
23468    fn deser(
23469        _version: MavlinkVersion,
23470        __input: &[u8],
23471    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23472        let avail_len = __input.len();
23473        let mut payload_buf = [0; Self::ENCODED_LEN];
23474        let mut buf = if avail_len < Self::ENCODED_LEN {
23475            payload_buf[0..avail_len].copy_from_slice(__input);
23476            Bytes::new(&payload_buf)
23477        } else {
23478            Bytes::new(__input)
23479        };
23480        let mut __struct = Self::default();
23481        __struct.target_system = buf.get_u8();
23482        __struct.target_component = buf.get_u8();
23483        for v in &mut __struct.param_id {
23484            let val = buf.get_u8();
23485            *v = val;
23486        }
23487        for v in &mut __struct.param_value {
23488            let val = buf.get_u8();
23489            *v = val;
23490        }
23491        let tmp = buf.get_u8();
23492        __struct.param_type =
23493            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23494                enum_type: "MavParamExtType",
23495                value: tmp as u32,
23496            })?;
23497        Ok(__struct)
23498    }
23499    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23500        let mut __tmp = BytesMut::new(bytes);
23501        #[allow(clippy::absurd_extreme_comparisons)]
23502        #[allow(unused_comparisons)]
23503        if __tmp.remaining() < Self::ENCODED_LEN {
23504            panic!(
23505                "buffer is too small (need {} bytes, but got {})",
23506                Self::ENCODED_LEN,
23507                __tmp.remaining(),
23508            )
23509        }
23510        __tmp.put_u8(self.target_system);
23511        __tmp.put_u8(self.target_component);
23512        for val in &self.param_id {
23513            __tmp.put_u8(*val);
23514        }
23515        for val in &self.param_value {
23516            __tmp.put_u8(*val);
23517        }
23518        __tmp.put_u8(self.param_type as u8);
23519        if matches!(version, MavlinkVersion::V2) {
23520            let len = __tmp.len();
23521            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23522        } else {
23523            __tmp.len()
23524        }
23525    }
23526}
23527#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
23528#[doc = ""]
23529#[doc = "ID: 322"]
23530#[derive(Debug, Clone, PartialEq)]
23531#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23533#[cfg_attr(feature = "ts", derive(TS))]
23534#[cfg_attr(feature = "ts", ts(export))]
23535pub struct PARAM_EXT_VALUE_DATA {
23536    #[doc = "Total number of parameters"]
23537    pub param_count: u16,
23538    #[doc = "Index of this parameter"]
23539    pub param_index: u16,
23540    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23541    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23542    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23543    pub param_id: [u8; 16],
23544    #[doc = "Parameter value"]
23545    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23546    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23547    pub param_value: [u8; 128],
23548    #[doc = "Parameter type."]
23549    pub param_type: MavParamExtType,
23550}
23551impl PARAM_EXT_VALUE_DATA {
23552    pub const ENCODED_LEN: usize = 149usize;
23553    pub const DEFAULT: Self = Self {
23554        param_count: 0_u16,
23555        param_index: 0_u16,
23556        param_id: [0_u8; 16usize],
23557        param_value: [0_u8; 128usize],
23558        param_type: MavParamExtType::DEFAULT,
23559    };
23560    #[cfg(feature = "arbitrary")]
23561    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23562        use arbitrary::{Arbitrary, Unstructured};
23563        let mut buf = [0u8; 1024];
23564        rng.fill_bytes(&mut buf);
23565        let mut unstructured = Unstructured::new(&buf);
23566        Self::arbitrary(&mut unstructured).unwrap_or_default()
23567    }
23568}
23569impl Default for PARAM_EXT_VALUE_DATA {
23570    fn default() -> Self {
23571        Self::DEFAULT.clone()
23572    }
23573}
23574impl MessageData for PARAM_EXT_VALUE_DATA {
23575    type Message = MavMessage;
23576    const ID: u32 = 322u32;
23577    const NAME: &'static str = "PARAM_EXT_VALUE";
23578    const EXTRA_CRC: u8 = 243u8;
23579    const ENCODED_LEN: usize = 149usize;
23580    fn deser(
23581        _version: MavlinkVersion,
23582        __input: &[u8],
23583    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23584        let avail_len = __input.len();
23585        let mut payload_buf = [0; Self::ENCODED_LEN];
23586        let mut buf = if avail_len < Self::ENCODED_LEN {
23587            payload_buf[0..avail_len].copy_from_slice(__input);
23588            Bytes::new(&payload_buf)
23589        } else {
23590            Bytes::new(__input)
23591        };
23592        let mut __struct = Self::default();
23593        __struct.param_count = buf.get_u16_le();
23594        __struct.param_index = buf.get_u16_le();
23595        for v in &mut __struct.param_id {
23596            let val = buf.get_u8();
23597            *v = val;
23598        }
23599        for v in &mut __struct.param_value {
23600            let val = buf.get_u8();
23601            *v = val;
23602        }
23603        let tmp = buf.get_u8();
23604        __struct.param_type =
23605            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23606                enum_type: "MavParamExtType",
23607                value: tmp as u32,
23608            })?;
23609        Ok(__struct)
23610    }
23611    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23612        let mut __tmp = BytesMut::new(bytes);
23613        #[allow(clippy::absurd_extreme_comparisons)]
23614        #[allow(unused_comparisons)]
23615        if __tmp.remaining() < Self::ENCODED_LEN {
23616            panic!(
23617                "buffer is too small (need {} bytes, but got {})",
23618                Self::ENCODED_LEN,
23619                __tmp.remaining(),
23620            )
23621        }
23622        __tmp.put_u16_le(self.param_count);
23623        __tmp.put_u16_le(self.param_index);
23624        for val in &self.param_id {
23625            __tmp.put_u8(*val);
23626        }
23627        for val in &self.param_value {
23628            __tmp.put_u8(*val);
23629        }
23630        __tmp.put_u8(self.param_type as u8);
23631        if matches!(version, MavlinkVersion::V2) {
23632            let len = __tmp.len();
23633            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23634        } else {
23635            __tmp.len()
23636        }
23637    }
23638}
23639#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
23640#[doc = ""]
23641#[doc = "ID: 50"]
23642#[derive(Debug, Clone, PartialEq)]
23643#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23644#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23645#[cfg_attr(feature = "ts", derive(TS))]
23646#[cfg_attr(feature = "ts", ts(export))]
23647pub struct PARAM_MAP_RC_DATA {
23648    #[doc = "Initial parameter value"]
23649    pub param_value0: f32,
23650    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
23651    pub scale: f32,
23652    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
23653    pub param_value_min: f32,
23654    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
23655    pub param_value_max: f32,
23656    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
23657    pub param_index: i16,
23658    #[doc = "System ID"]
23659    pub target_system: u8,
23660    #[doc = "Component ID"]
23661    pub target_component: u8,
23662    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23663    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23664    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23665    pub param_id: [u8; 16],
23666    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
23667    pub parameter_rc_channel_index: u8,
23668}
23669impl PARAM_MAP_RC_DATA {
23670    pub const ENCODED_LEN: usize = 37usize;
23671    pub const DEFAULT: Self = Self {
23672        param_value0: 0.0_f32,
23673        scale: 0.0_f32,
23674        param_value_min: 0.0_f32,
23675        param_value_max: 0.0_f32,
23676        param_index: 0_i16,
23677        target_system: 0_u8,
23678        target_component: 0_u8,
23679        param_id: [0_u8; 16usize],
23680        parameter_rc_channel_index: 0_u8,
23681    };
23682    #[cfg(feature = "arbitrary")]
23683    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23684        use arbitrary::{Arbitrary, Unstructured};
23685        let mut buf = [0u8; 1024];
23686        rng.fill_bytes(&mut buf);
23687        let mut unstructured = Unstructured::new(&buf);
23688        Self::arbitrary(&mut unstructured).unwrap_or_default()
23689    }
23690}
23691impl Default for PARAM_MAP_RC_DATA {
23692    fn default() -> Self {
23693        Self::DEFAULT.clone()
23694    }
23695}
23696impl MessageData for PARAM_MAP_RC_DATA {
23697    type Message = MavMessage;
23698    const ID: u32 = 50u32;
23699    const NAME: &'static str = "PARAM_MAP_RC";
23700    const EXTRA_CRC: u8 = 78u8;
23701    const ENCODED_LEN: usize = 37usize;
23702    fn deser(
23703        _version: MavlinkVersion,
23704        __input: &[u8],
23705    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23706        let avail_len = __input.len();
23707        let mut payload_buf = [0; Self::ENCODED_LEN];
23708        let mut buf = if avail_len < Self::ENCODED_LEN {
23709            payload_buf[0..avail_len].copy_from_slice(__input);
23710            Bytes::new(&payload_buf)
23711        } else {
23712            Bytes::new(__input)
23713        };
23714        let mut __struct = Self::default();
23715        __struct.param_value0 = buf.get_f32_le();
23716        __struct.scale = buf.get_f32_le();
23717        __struct.param_value_min = buf.get_f32_le();
23718        __struct.param_value_max = buf.get_f32_le();
23719        __struct.param_index = buf.get_i16_le();
23720        __struct.target_system = buf.get_u8();
23721        __struct.target_component = buf.get_u8();
23722        for v in &mut __struct.param_id {
23723            let val = buf.get_u8();
23724            *v = val;
23725        }
23726        __struct.parameter_rc_channel_index = buf.get_u8();
23727        Ok(__struct)
23728    }
23729    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23730        let mut __tmp = BytesMut::new(bytes);
23731        #[allow(clippy::absurd_extreme_comparisons)]
23732        #[allow(unused_comparisons)]
23733        if __tmp.remaining() < Self::ENCODED_LEN {
23734            panic!(
23735                "buffer is too small (need {} bytes, but got {})",
23736                Self::ENCODED_LEN,
23737                __tmp.remaining(),
23738            )
23739        }
23740        __tmp.put_f32_le(self.param_value0);
23741        __tmp.put_f32_le(self.scale);
23742        __tmp.put_f32_le(self.param_value_min);
23743        __tmp.put_f32_le(self.param_value_max);
23744        __tmp.put_i16_le(self.param_index);
23745        __tmp.put_u8(self.target_system);
23746        __tmp.put_u8(self.target_component);
23747        for val in &self.param_id {
23748            __tmp.put_u8(*val);
23749        }
23750        __tmp.put_u8(self.parameter_rc_channel_index);
23751        if matches!(version, MavlinkVersion::V2) {
23752            let len = __tmp.len();
23753            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23754        } else {
23755            __tmp.len()
23756        }
23757    }
23758}
23759#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23760#[doc = ""]
23761#[doc = "ID: 21"]
23762#[derive(Debug, Clone, PartialEq)]
23763#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23764#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23765#[cfg_attr(feature = "ts", derive(TS))]
23766#[cfg_attr(feature = "ts", ts(export))]
23767pub struct PARAM_REQUEST_LIST_DATA {
23768    #[doc = "System ID"]
23769    pub target_system: u8,
23770    #[doc = "Component ID"]
23771    pub target_component: u8,
23772}
23773impl PARAM_REQUEST_LIST_DATA {
23774    pub const ENCODED_LEN: usize = 2usize;
23775    pub const DEFAULT: Self = Self {
23776        target_system: 0_u8,
23777        target_component: 0_u8,
23778    };
23779    #[cfg(feature = "arbitrary")]
23780    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23781        use arbitrary::{Arbitrary, Unstructured};
23782        let mut buf = [0u8; 1024];
23783        rng.fill_bytes(&mut buf);
23784        let mut unstructured = Unstructured::new(&buf);
23785        Self::arbitrary(&mut unstructured).unwrap_or_default()
23786    }
23787}
23788impl Default for PARAM_REQUEST_LIST_DATA {
23789    fn default() -> Self {
23790        Self::DEFAULT.clone()
23791    }
23792}
23793impl MessageData for PARAM_REQUEST_LIST_DATA {
23794    type Message = MavMessage;
23795    const ID: u32 = 21u32;
23796    const NAME: &'static str = "PARAM_REQUEST_LIST";
23797    const EXTRA_CRC: u8 = 159u8;
23798    const ENCODED_LEN: usize = 2usize;
23799    fn deser(
23800        _version: MavlinkVersion,
23801        __input: &[u8],
23802    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23803        let avail_len = __input.len();
23804        let mut payload_buf = [0; Self::ENCODED_LEN];
23805        let mut buf = if avail_len < Self::ENCODED_LEN {
23806            payload_buf[0..avail_len].copy_from_slice(__input);
23807            Bytes::new(&payload_buf)
23808        } else {
23809            Bytes::new(__input)
23810        };
23811        let mut __struct = Self::default();
23812        __struct.target_system = buf.get_u8();
23813        __struct.target_component = buf.get_u8();
23814        Ok(__struct)
23815    }
23816    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23817        let mut __tmp = BytesMut::new(bytes);
23818        #[allow(clippy::absurd_extreme_comparisons)]
23819        #[allow(unused_comparisons)]
23820        if __tmp.remaining() < Self::ENCODED_LEN {
23821            panic!(
23822                "buffer is too small (need {} bytes, but got {})",
23823                Self::ENCODED_LEN,
23824                __tmp.remaining(),
23825            )
23826        }
23827        __tmp.put_u8(self.target_system);
23828        __tmp.put_u8(self.target_component);
23829        if matches!(version, MavlinkVersion::V2) {
23830            let len = __tmp.len();
23831            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23832        } else {
23833            __tmp.len()
23834        }
23835    }
23836}
23837#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
23838#[doc = ""]
23839#[doc = "ID: 20"]
23840#[derive(Debug, Clone, PartialEq)]
23841#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23842#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23843#[cfg_attr(feature = "ts", derive(TS))]
23844#[cfg_attr(feature = "ts", ts(export))]
23845pub struct PARAM_REQUEST_READ_DATA {
23846    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
23847    pub param_index: i16,
23848    #[doc = "System ID"]
23849    pub target_system: u8,
23850    #[doc = "Component ID"]
23851    pub target_component: u8,
23852    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23853    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23854    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23855    pub param_id: [u8; 16],
23856}
23857impl PARAM_REQUEST_READ_DATA {
23858    pub const ENCODED_LEN: usize = 20usize;
23859    pub const DEFAULT: Self = Self {
23860        param_index: 0_i16,
23861        target_system: 0_u8,
23862        target_component: 0_u8,
23863        param_id: [0_u8; 16usize],
23864    };
23865    #[cfg(feature = "arbitrary")]
23866    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23867        use arbitrary::{Arbitrary, Unstructured};
23868        let mut buf = [0u8; 1024];
23869        rng.fill_bytes(&mut buf);
23870        let mut unstructured = Unstructured::new(&buf);
23871        Self::arbitrary(&mut unstructured).unwrap_or_default()
23872    }
23873}
23874impl Default for PARAM_REQUEST_READ_DATA {
23875    fn default() -> Self {
23876        Self::DEFAULT.clone()
23877    }
23878}
23879impl MessageData for PARAM_REQUEST_READ_DATA {
23880    type Message = MavMessage;
23881    const ID: u32 = 20u32;
23882    const NAME: &'static str = "PARAM_REQUEST_READ";
23883    const EXTRA_CRC: u8 = 214u8;
23884    const ENCODED_LEN: usize = 20usize;
23885    fn deser(
23886        _version: MavlinkVersion,
23887        __input: &[u8],
23888    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23889        let avail_len = __input.len();
23890        let mut payload_buf = [0; Self::ENCODED_LEN];
23891        let mut buf = if avail_len < Self::ENCODED_LEN {
23892            payload_buf[0..avail_len].copy_from_slice(__input);
23893            Bytes::new(&payload_buf)
23894        } else {
23895            Bytes::new(__input)
23896        };
23897        let mut __struct = Self::default();
23898        __struct.param_index = buf.get_i16_le();
23899        __struct.target_system = buf.get_u8();
23900        __struct.target_component = buf.get_u8();
23901        for v in &mut __struct.param_id {
23902            let val = buf.get_u8();
23903            *v = val;
23904        }
23905        Ok(__struct)
23906    }
23907    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23908        let mut __tmp = BytesMut::new(bytes);
23909        #[allow(clippy::absurd_extreme_comparisons)]
23910        #[allow(unused_comparisons)]
23911        if __tmp.remaining() < Self::ENCODED_LEN {
23912            panic!(
23913                "buffer is too small (need {} bytes, but got {})",
23914                Self::ENCODED_LEN,
23915                __tmp.remaining(),
23916            )
23917        }
23918        __tmp.put_i16_le(self.param_index);
23919        __tmp.put_u8(self.target_system);
23920        __tmp.put_u8(self.target_component);
23921        for val in &self.param_id {
23922            __tmp.put_u8(*val);
23923        }
23924        if matches!(version, MavlinkVersion::V2) {
23925            let len = __tmp.len();
23926            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23927        } else {
23928            __tmp.len()
23929        }
23930    }
23931}
23932#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23933#[doc = ""]
23934#[doc = "ID: 23"]
23935#[derive(Debug, Clone, PartialEq)]
23936#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23937#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23938#[cfg_attr(feature = "ts", derive(TS))]
23939#[cfg_attr(feature = "ts", ts(export))]
23940pub struct PARAM_SET_DATA {
23941    #[doc = "Onboard parameter value"]
23942    pub param_value: f32,
23943    #[doc = "System ID"]
23944    pub target_system: u8,
23945    #[doc = "Component ID"]
23946    pub target_component: u8,
23947    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23948    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23949    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23950    pub param_id: [u8; 16],
23951    #[doc = "Onboard parameter type."]
23952    pub param_type: MavParamType,
23953}
23954impl PARAM_SET_DATA {
23955    pub const ENCODED_LEN: usize = 23usize;
23956    pub const DEFAULT: Self = Self {
23957        param_value: 0.0_f32,
23958        target_system: 0_u8,
23959        target_component: 0_u8,
23960        param_id: [0_u8; 16usize],
23961        param_type: MavParamType::DEFAULT,
23962    };
23963    #[cfg(feature = "arbitrary")]
23964    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23965        use arbitrary::{Arbitrary, Unstructured};
23966        let mut buf = [0u8; 1024];
23967        rng.fill_bytes(&mut buf);
23968        let mut unstructured = Unstructured::new(&buf);
23969        Self::arbitrary(&mut unstructured).unwrap_or_default()
23970    }
23971}
23972impl Default for PARAM_SET_DATA {
23973    fn default() -> Self {
23974        Self::DEFAULT.clone()
23975    }
23976}
23977impl MessageData for PARAM_SET_DATA {
23978    type Message = MavMessage;
23979    const ID: u32 = 23u32;
23980    const NAME: &'static str = "PARAM_SET";
23981    const EXTRA_CRC: u8 = 168u8;
23982    const ENCODED_LEN: usize = 23usize;
23983    fn deser(
23984        _version: MavlinkVersion,
23985        __input: &[u8],
23986    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23987        let avail_len = __input.len();
23988        let mut payload_buf = [0; Self::ENCODED_LEN];
23989        let mut buf = if avail_len < Self::ENCODED_LEN {
23990            payload_buf[0..avail_len].copy_from_slice(__input);
23991            Bytes::new(&payload_buf)
23992        } else {
23993            Bytes::new(__input)
23994        };
23995        let mut __struct = Self::default();
23996        __struct.param_value = buf.get_f32_le();
23997        __struct.target_system = buf.get_u8();
23998        __struct.target_component = buf.get_u8();
23999        for v in &mut __struct.param_id {
24000            let val = buf.get_u8();
24001            *v = val;
24002        }
24003        let tmp = buf.get_u8();
24004        __struct.param_type =
24005            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24006                enum_type: "MavParamType",
24007                value: tmp as u32,
24008            })?;
24009        Ok(__struct)
24010    }
24011    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24012        let mut __tmp = BytesMut::new(bytes);
24013        #[allow(clippy::absurd_extreme_comparisons)]
24014        #[allow(unused_comparisons)]
24015        if __tmp.remaining() < Self::ENCODED_LEN {
24016            panic!(
24017                "buffer is too small (need {} bytes, but got {})",
24018                Self::ENCODED_LEN,
24019                __tmp.remaining(),
24020            )
24021        }
24022        __tmp.put_f32_le(self.param_value);
24023        __tmp.put_u8(self.target_system);
24024        __tmp.put_u8(self.target_component);
24025        for val in &self.param_id {
24026            __tmp.put_u8(*val);
24027        }
24028        __tmp.put_u8(self.param_type as u8);
24029        if matches!(version, MavlinkVersion::V2) {
24030            let len = __tmp.len();
24031            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24032        } else {
24033            __tmp.len()
24034        }
24035    }
24036}
24037#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24038#[doc = ""]
24039#[doc = "ID: 22"]
24040#[derive(Debug, Clone, PartialEq)]
24041#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24042#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24043#[cfg_attr(feature = "ts", derive(TS))]
24044#[cfg_attr(feature = "ts", ts(export))]
24045pub struct PARAM_VALUE_DATA {
24046    #[doc = "Onboard parameter value"]
24047    pub param_value: f32,
24048    #[doc = "Total number of onboard parameters"]
24049    pub param_count: u16,
24050    #[doc = "Index of this onboard parameter"]
24051    pub param_index: u16,
24052    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24053    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24054    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24055    pub param_id: [u8; 16],
24056    #[doc = "Onboard parameter type."]
24057    pub param_type: MavParamType,
24058}
24059impl PARAM_VALUE_DATA {
24060    pub const ENCODED_LEN: usize = 25usize;
24061    pub const DEFAULT: Self = Self {
24062        param_value: 0.0_f32,
24063        param_count: 0_u16,
24064        param_index: 0_u16,
24065        param_id: [0_u8; 16usize],
24066        param_type: MavParamType::DEFAULT,
24067    };
24068    #[cfg(feature = "arbitrary")]
24069    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24070        use arbitrary::{Arbitrary, Unstructured};
24071        let mut buf = [0u8; 1024];
24072        rng.fill_bytes(&mut buf);
24073        let mut unstructured = Unstructured::new(&buf);
24074        Self::arbitrary(&mut unstructured).unwrap_or_default()
24075    }
24076}
24077impl Default for PARAM_VALUE_DATA {
24078    fn default() -> Self {
24079        Self::DEFAULT.clone()
24080    }
24081}
24082impl MessageData for PARAM_VALUE_DATA {
24083    type Message = MavMessage;
24084    const ID: u32 = 22u32;
24085    const NAME: &'static str = "PARAM_VALUE";
24086    const EXTRA_CRC: u8 = 220u8;
24087    const ENCODED_LEN: usize = 25usize;
24088    fn deser(
24089        _version: MavlinkVersion,
24090        __input: &[u8],
24091    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24092        let avail_len = __input.len();
24093        let mut payload_buf = [0; Self::ENCODED_LEN];
24094        let mut buf = if avail_len < Self::ENCODED_LEN {
24095            payload_buf[0..avail_len].copy_from_slice(__input);
24096            Bytes::new(&payload_buf)
24097        } else {
24098            Bytes::new(__input)
24099        };
24100        let mut __struct = Self::default();
24101        __struct.param_value = buf.get_f32_le();
24102        __struct.param_count = buf.get_u16_le();
24103        __struct.param_index = buf.get_u16_le();
24104        for v in &mut __struct.param_id {
24105            let val = buf.get_u8();
24106            *v = val;
24107        }
24108        let tmp = buf.get_u8();
24109        __struct.param_type =
24110            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24111                enum_type: "MavParamType",
24112                value: tmp as u32,
24113            })?;
24114        Ok(__struct)
24115    }
24116    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24117        let mut __tmp = BytesMut::new(bytes);
24118        #[allow(clippy::absurd_extreme_comparisons)]
24119        #[allow(unused_comparisons)]
24120        if __tmp.remaining() < Self::ENCODED_LEN {
24121            panic!(
24122                "buffer is too small (need {} bytes, but got {})",
24123                Self::ENCODED_LEN,
24124                __tmp.remaining(),
24125            )
24126        }
24127        __tmp.put_f32_le(self.param_value);
24128        __tmp.put_u16_le(self.param_count);
24129        __tmp.put_u16_le(self.param_index);
24130        for val in &self.param_id {
24131            __tmp.put_u8(*val);
24132        }
24133        __tmp.put_u8(self.param_type as u8);
24134        if matches!(version, MavlinkVersion::V2) {
24135            let len = __tmp.len();
24136            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24137        } else {
24138            __tmp.len()
24139        }
24140    }
24141}
24142#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
24143#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
24144#[doc = ""]
24145#[doc = "ID: 4"]
24146#[derive(Debug, Clone, PartialEq)]
24147#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24148#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24149#[cfg_attr(feature = "ts", derive(TS))]
24150#[cfg_attr(feature = "ts", ts(export))]
24151pub struct PING_DATA {
24152    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24153    pub time_usec: u64,
24154    #[doc = "PING sequence"]
24155    pub seq: u32,
24156    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
24157    pub target_system: u8,
24158    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
24159    pub target_component: u8,
24160}
24161impl PING_DATA {
24162    pub const ENCODED_LEN: usize = 14usize;
24163    pub const DEFAULT: Self = Self {
24164        time_usec: 0_u64,
24165        seq: 0_u32,
24166        target_system: 0_u8,
24167        target_component: 0_u8,
24168    };
24169    #[cfg(feature = "arbitrary")]
24170    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24171        use arbitrary::{Arbitrary, Unstructured};
24172        let mut buf = [0u8; 1024];
24173        rng.fill_bytes(&mut buf);
24174        let mut unstructured = Unstructured::new(&buf);
24175        Self::arbitrary(&mut unstructured).unwrap_or_default()
24176    }
24177}
24178impl Default for PING_DATA {
24179    fn default() -> Self {
24180        Self::DEFAULT.clone()
24181    }
24182}
24183impl MessageData for PING_DATA {
24184    type Message = MavMessage;
24185    const ID: u32 = 4u32;
24186    const NAME: &'static str = "PING";
24187    const EXTRA_CRC: u8 = 237u8;
24188    const ENCODED_LEN: usize = 14usize;
24189    fn deser(
24190        _version: MavlinkVersion,
24191        __input: &[u8],
24192    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24193        let avail_len = __input.len();
24194        let mut payload_buf = [0; Self::ENCODED_LEN];
24195        let mut buf = if avail_len < Self::ENCODED_LEN {
24196            payload_buf[0..avail_len].copy_from_slice(__input);
24197            Bytes::new(&payload_buf)
24198        } else {
24199            Bytes::new(__input)
24200        };
24201        let mut __struct = Self::default();
24202        __struct.time_usec = buf.get_u64_le();
24203        __struct.seq = buf.get_u32_le();
24204        __struct.target_system = buf.get_u8();
24205        __struct.target_component = buf.get_u8();
24206        Ok(__struct)
24207    }
24208    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24209        let mut __tmp = BytesMut::new(bytes);
24210        #[allow(clippy::absurd_extreme_comparisons)]
24211        #[allow(unused_comparisons)]
24212        if __tmp.remaining() < Self::ENCODED_LEN {
24213            panic!(
24214                "buffer is too small (need {} bytes, but got {})",
24215                Self::ENCODED_LEN,
24216                __tmp.remaining(),
24217            )
24218        }
24219        __tmp.put_u64_le(self.time_usec);
24220        __tmp.put_u32_le(self.seq);
24221        __tmp.put_u8(self.target_system);
24222        __tmp.put_u8(self.target_component);
24223        if matches!(version, MavlinkVersion::V2) {
24224            let len = __tmp.len();
24225            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24226        } else {
24227            __tmp.len()
24228        }
24229    }
24230}
24231#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
24232#[doc = "Control vehicle tone generation (buzzer)."]
24233#[doc = ""]
24234#[doc = "ID: 258"]
24235#[derive(Debug, Clone, PartialEq)]
24236#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24237#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24238#[cfg_attr(feature = "ts", derive(TS))]
24239#[cfg_attr(feature = "ts", ts(export))]
24240pub struct PLAY_TUNE_DATA {
24241    #[doc = "System ID"]
24242    pub target_system: u8,
24243    #[doc = "Component ID"]
24244    pub target_component: u8,
24245    #[doc = "tune in board specific format"]
24246    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24247    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24248    pub tune: [u8; 30],
24249    #[doc = "tune extension (appended to tune)"]
24250    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24251    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24252    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24253    pub tune2: [u8; 200],
24254}
24255impl PLAY_TUNE_DATA {
24256    pub const ENCODED_LEN: usize = 232usize;
24257    pub const DEFAULT: Self = Self {
24258        target_system: 0_u8,
24259        target_component: 0_u8,
24260        tune: [0_u8; 30usize],
24261        tune2: [0_u8; 200usize],
24262    };
24263    #[cfg(feature = "arbitrary")]
24264    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24265        use arbitrary::{Arbitrary, Unstructured};
24266        let mut buf = [0u8; 1024];
24267        rng.fill_bytes(&mut buf);
24268        let mut unstructured = Unstructured::new(&buf);
24269        Self::arbitrary(&mut unstructured).unwrap_or_default()
24270    }
24271}
24272impl Default for PLAY_TUNE_DATA {
24273    fn default() -> Self {
24274        Self::DEFAULT.clone()
24275    }
24276}
24277impl MessageData for PLAY_TUNE_DATA {
24278    type Message = MavMessage;
24279    const ID: u32 = 258u32;
24280    const NAME: &'static str = "PLAY_TUNE";
24281    const EXTRA_CRC: u8 = 187u8;
24282    const ENCODED_LEN: usize = 232usize;
24283    fn deser(
24284        _version: MavlinkVersion,
24285        __input: &[u8],
24286    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24287        let avail_len = __input.len();
24288        let mut payload_buf = [0; Self::ENCODED_LEN];
24289        let mut buf = if avail_len < Self::ENCODED_LEN {
24290            payload_buf[0..avail_len].copy_from_slice(__input);
24291            Bytes::new(&payload_buf)
24292        } else {
24293            Bytes::new(__input)
24294        };
24295        let mut __struct = Self::default();
24296        __struct.target_system = buf.get_u8();
24297        __struct.target_component = buf.get_u8();
24298        for v in &mut __struct.tune {
24299            let val = buf.get_u8();
24300            *v = val;
24301        }
24302        for v in &mut __struct.tune2 {
24303            let val = buf.get_u8();
24304            *v = val;
24305        }
24306        Ok(__struct)
24307    }
24308    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24309        let mut __tmp = BytesMut::new(bytes);
24310        #[allow(clippy::absurd_extreme_comparisons)]
24311        #[allow(unused_comparisons)]
24312        if __tmp.remaining() < Self::ENCODED_LEN {
24313            panic!(
24314                "buffer is too small (need {} bytes, but got {})",
24315                Self::ENCODED_LEN,
24316                __tmp.remaining(),
24317            )
24318        }
24319        __tmp.put_u8(self.target_system);
24320        __tmp.put_u8(self.target_component);
24321        for val in &self.tune {
24322            __tmp.put_u8(*val);
24323        }
24324        if matches!(version, MavlinkVersion::V2) {
24325            for val in &self.tune2 {
24326                __tmp.put_u8(*val);
24327            }
24328            let len = __tmp.len();
24329            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24330        } else {
24331            __tmp.len()
24332        }
24333    }
24334}
24335#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
24336#[doc = ""]
24337#[doc = "ID: 400"]
24338#[derive(Debug, Clone, PartialEq)]
24339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24340#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24341#[cfg_attr(feature = "ts", derive(TS))]
24342#[cfg_attr(feature = "ts", ts(export))]
24343pub struct PLAY_TUNE_V2_DATA {
24344    #[doc = "Tune format"]
24345    pub format: TuneFormat,
24346    #[doc = "System ID"]
24347    pub target_system: u8,
24348    #[doc = "Component ID"]
24349    pub target_component: u8,
24350    #[doc = "Tune definition as a NULL-terminated string."]
24351    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24352    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24353    pub tune: [u8; 248],
24354}
24355impl PLAY_TUNE_V2_DATA {
24356    pub const ENCODED_LEN: usize = 254usize;
24357    pub const DEFAULT: Self = Self {
24358        format: TuneFormat::DEFAULT,
24359        target_system: 0_u8,
24360        target_component: 0_u8,
24361        tune: [0_u8; 248usize],
24362    };
24363    #[cfg(feature = "arbitrary")]
24364    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24365        use arbitrary::{Arbitrary, Unstructured};
24366        let mut buf = [0u8; 1024];
24367        rng.fill_bytes(&mut buf);
24368        let mut unstructured = Unstructured::new(&buf);
24369        Self::arbitrary(&mut unstructured).unwrap_or_default()
24370    }
24371}
24372impl Default for PLAY_TUNE_V2_DATA {
24373    fn default() -> Self {
24374        Self::DEFAULT.clone()
24375    }
24376}
24377impl MessageData for PLAY_TUNE_V2_DATA {
24378    type Message = MavMessage;
24379    const ID: u32 = 400u32;
24380    const NAME: &'static str = "PLAY_TUNE_V2";
24381    const EXTRA_CRC: u8 = 110u8;
24382    const ENCODED_LEN: usize = 254usize;
24383    fn deser(
24384        _version: MavlinkVersion,
24385        __input: &[u8],
24386    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24387        let avail_len = __input.len();
24388        let mut payload_buf = [0; Self::ENCODED_LEN];
24389        let mut buf = if avail_len < Self::ENCODED_LEN {
24390            payload_buf[0..avail_len].copy_from_slice(__input);
24391            Bytes::new(&payload_buf)
24392        } else {
24393            Bytes::new(__input)
24394        };
24395        let mut __struct = Self::default();
24396        let tmp = buf.get_u32_le();
24397        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
24398            ::mavlink_core::error::ParserError::InvalidEnum {
24399                enum_type: "TuneFormat",
24400                value: tmp as u32,
24401            },
24402        )?;
24403        __struct.target_system = buf.get_u8();
24404        __struct.target_component = buf.get_u8();
24405        for v in &mut __struct.tune {
24406            let val = buf.get_u8();
24407            *v = val;
24408        }
24409        Ok(__struct)
24410    }
24411    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24412        let mut __tmp = BytesMut::new(bytes);
24413        #[allow(clippy::absurd_extreme_comparisons)]
24414        #[allow(unused_comparisons)]
24415        if __tmp.remaining() < Self::ENCODED_LEN {
24416            panic!(
24417                "buffer is too small (need {} bytes, but got {})",
24418                Self::ENCODED_LEN,
24419                __tmp.remaining(),
24420            )
24421        }
24422        __tmp.put_u32_le(self.format as u32);
24423        __tmp.put_u8(self.target_system);
24424        __tmp.put_u8(self.target_component);
24425        for val in &self.tune {
24426            __tmp.put_u8(*val);
24427        }
24428        if matches!(version, MavlinkVersion::V2) {
24429            let len = __tmp.len();
24430            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24431        } else {
24432            __tmp.len()
24433        }
24434    }
24435}
24436#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
24437#[doc = ""]
24438#[doc = "ID: 87"]
24439#[derive(Debug, Clone, PartialEq)]
24440#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24441#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24442#[cfg_attr(feature = "ts", derive(TS))]
24443#[cfg_attr(feature = "ts", ts(export))]
24444pub struct POSITION_TARGET_GLOBAL_INT_DATA {
24445    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
24446    pub time_boot_ms: u32,
24447    #[doc = "Latitude in WGS84 frame"]
24448    pub lat_int: i32,
24449    #[doc = "Longitude in WGS84 frame"]
24450    pub lon_int: i32,
24451    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
24452    pub alt: f32,
24453    #[doc = "X velocity in NED frame"]
24454    pub vx: f32,
24455    #[doc = "Y velocity in NED frame"]
24456    pub vy: f32,
24457    #[doc = "Z velocity in NED frame"]
24458    pub vz: f32,
24459    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24460    pub afx: f32,
24461    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24462    pub afy: f32,
24463    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24464    pub afz: f32,
24465    #[doc = "yaw setpoint"]
24466    pub yaw: f32,
24467    #[doc = "yaw rate setpoint"]
24468    pub yaw_rate: f32,
24469    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24470    pub type_mask: PositionTargetTypemask,
24471    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
24472    pub coordinate_frame: MavFrame,
24473}
24474impl POSITION_TARGET_GLOBAL_INT_DATA {
24475    pub const ENCODED_LEN: usize = 51usize;
24476    pub const DEFAULT: Self = Self {
24477        time_boot_ms: 0_u32,
24478        lat_int: 0_i32,
24479        lon_int: 0_i32,
24480        alt: 0.0_f32,
24481        vx: 0.0_f32,
24482        vy: 0.0_f32,
24483        vz: 0.0_f32,
24484        afx: 0.0_f32,
24485        afy: 0.0_f32,
24486        afz: 0.0_f32,
24487        yaw: 0.0_f32,
24488        yaw_rate: 0.0_f32,
24489        type_mask: PositionTargetTypemask::DEFAULT,
24490        coordinate_frame: MavFrame::DEFAULT,
24491    };
24492    #[cfg(feature = "arbitrary")]
24493    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24494        use arbitrary::{Arbitrary, Unstructured};
24495        let mut buf = [0u8; 1024];
24496        rng.fill_bytes(&mut buf);
24497        let mut unstructured = Unstructured::new(&buf);
24498        Self::arbitrary(&mut unstructured).unwrap_or_default()
24499    }
24500}
24501impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
24502    fn default() -> Self {
24503        Self::DEFAULT.clone()
24504    }
24505}
24506impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
24507    type Message = MavMessage;
24508    const ID: u32 = 87u32;
24509    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
24510    const EXTRA_CRC: u8 = 150u8;
24511    const ENCODED_LEN: usize = 51usize;
24512    fn deser(
24513        _version: MavlinkVersion,
24514        __input: &[u8],
24515    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24516        let avail_len = __input.len();
24517        let mut payload_buf = [0; Self::ENCODED_LEN];
24518        let mut buf = if avail_len < Self::ENCODED_LEN {
24519            payload_buf[0..avail_len].copy_from_slice(__input);
24520            Bytes::new(&payload_buf)
24521        } else {
24522            Bytes::new(__input)
24523        };
24524        let mut __struct = Self::default();
24525        __struct.time_boot_ms = buf.get_u32_le();
24526        __struct.lat_int = buf.get_i32_le();
24527        __struct.lon_int = buf.get_i32_le();
24528        __struct.alt = buf.get_f32_le();
24529        __struct.vx = buf.get_f32_le();
24530        __struct.vy = buf.get_f32_le();
24531        __struct.vz = buf.get_f32_le();
24532        __struct.afx = buf.get_f32_le();
24533        __struct.afy = buf.get_f32_le();
24534        __struct.afz = buf.get_f32_le();
24535        __struct.yaw = buf.get_f32_le();
24536        __struct.yaw_rate = buf.get_f32_le();
24537        let tmp = buf.get_u16_le();
24538        __struct.type_mask = PositionTargetTypemask::from_bits(
24539            tmp & PositionTargetTypemask::all().bits(),
24540        )
24541        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24542            flag_type: "PositionTargetTypemask",
24543            value: tmp as u32,
24544        })?;
24545        let tmp = buf.get_u8();
24546        __struct.coordinate_frame =
24547            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24548                enum_type: "MavFrame",
24549                value: tmp as u32,
24550            })?;
24551        Ok(__struct)
24552    }
24553    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24554        let mut __tmp = BytesMut::new(bytes);
24555        #[allow(clippy::absurd_extreme_comparisons)]
24556        #[allow(unused_comparisons)]
24557        if __tmp.remaining() < Self::ENCODED_LEN {
24558            panic!(
24559                "buffer is too small (need {} bytes, but got {})",
24560                Self::ENCODED_LEN,
24561                __tmp.remaining(),
24562            )
24563        }
24564        __tmp.put_u32_le(self.time_boot_ms);
24565        __tmp.put_i32_le(self.lat_int);
24566        __tmp.put_i32_le(self.lon_int);
24567        __tmp.put_f32_le(self.alt);
24568        __tmp.put_f32_le(self.vx);
24569        __tmp.put_f32_le(self.vy);
24570        __tmp.put_f32_le(self.vz);
24571        __tmp.put_f32_le(self.afx);
24572        __tmp.put_f32_le(self.afy);
24573        __tmp.put_f32_le(self.afz);
24574        __tmp.put_f32_le(self.yaw);
24575        __tmp.put_f32_le(self.yaw_rate);
24576        __tmp.put_u16_le(self.type_mask.bits());
24577        __tmp.put_u8(self.coordinate_frame as u8);
24578        if matches!(version, MavlinkVersion::V2) {
24579            let len = __tmp.len();
24580            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24581        } else {
24582            __tmp.len()
24583        }
24584    }
24585}
24586#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
24587#[doc = ""]
24588#[doc = "ID: 85"]
24589#[derive(Debug, Clone, PartialEq)]
24590#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24591#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24592#[cfg_attr(feature = "ts", derive(TS))]
24593#[cfg_attr(feature = "ts", ts(export))]
24594pub struct POSITION_TARGET_LOCAL_NED_DATA {
24595    #[doc = "Timestamp (time since system boot)."]
24596    pub time_boot_ms: u32,
24597    #[doc = "X Position in NED frame"]
24598    pub x: f32,
24599    #[doc = "Y Position in NED frame"]
24600    pub y: f32,
24601    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
24602    pub z: f32,
24603    #[doc = "X velocity in NED frame"]
24604    pub vx: f32,
24605    #[doc = "Y velocity in NED frame"]
24606    pub vy: f32,
24607    #[doc = "Z velocity in NED frame"]
24608    pub vz: f32,
24609    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24610    pub afx: f32,
24611    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24612    pub afy: f32,
24613    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24614    pub afz: f32,
24615    #[doc = "yaw setpoint"]
24616    pub yaw: f32,
24617    #[doc = "yaw rate setpoint"]
24618    pub yaw_rate: f32,
24619    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24620    pub type_mask: PositionTargetTypemask,
24621    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
24622    pub coordinate_frame: MavFrame,
24623}
24624impl POSITION_TARGET_LOCAL_NED_DATA {
24625    pub const ENCODED_LEN: usize = 51usize;
24626    pub const DEFAULT: Self = Self {
24627        time_boot_ms: 0_u32,
24628        x: 0.0_f32,
24629        y: 0.0_f32,
24630        z: 0.0_f32,
24631        vx: 0.0_f32,
24632        vy: 0.0_f32,
24633        vz: 0.0_f32,
24634        afx: 0.0_f32,
24635        afy: 0.0_f32,
24636        afz: 0.0_f32,
24637        yaw: 0.0_f32,
24638        yaw_rate: 0.0_f32,
24639        type_mask: PositionTargetTypemask::DEFAULT,
24640        coordinate_frame: MavFrame::DEFAULT,
24641    };
24642    #[cfg(feature = "arbitrary")]
24643    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24644        use arbitrary::{Arbitrary, Unstructured};
24645        let mut buf = [0u8; 1024];
24646        rng.fill_bytes(&mut buf);
24647        let mut unstructured = Unstructured::new(&buf);
24648        Self::arbitrary(&mut unstructured).unwrap_or_default()
24649    }
24650}
24651impl Default for POSITION_TARGET_LOCAL_NED_DATA {
24652    fn default() -> Self {
24653        Self::DEFAULT.clone()
24654    }
24655}
24656impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
24657    type Message = MavMessage;
24658    const ID: u32 = 85u32;
24659    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
24660    const EXTRA_CRC: u8 = 140u8;
24661    const ENCODED_LEN: usize = 51usize;
24662    fn deser(
24663        _version: MavlinkVersion,
24664        __input: &[u8],
24665    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24666        let avail_len = __input.len();
24667        let mut payload_buf = [0; Self::ENCODED_LEN];
24668        let mut buf = if avail_len < Self::ENCODED_LEN {
24669            payload_buf[0..avail_len].copy_from_slice(__input);
24670            Bytes::new(&payload_buf)
24671        } else {
24672            Bytes::new(__input)
24673        };
24674        let mut __struct = Self::default();
24675        __struct.time_boot_ms = buf.get_u32_le();
24676        __struct.x = buf.get_f32_le();
24677        __struct.y = buf.get_f32_le();
24678        __struct.z = buf.get_f32_le();
24679        __struct.vx = buf.get_f32_le();
24680        __struct.vy = buf.get_f32_le();
24681        __struct.vz = buf.get_f32_le();
24682        __struct.afx = buf.get_f32_le();
24683        __struct.afy = buf.get_f32_le();
24684        __struct.afz = buf.get_f32_le();
24685        __struct.yaw = buf.get_f32_le();
24686        __struct.yaw_rate = buf.get_f32_le();
24687        let tmp = buf.get_u16_le();
24688        __struct.type_mask = PositionTargetTypemask::from_bits(
24689            tmp & PositionTargetTypemask::all().bits(),
24690        )
24691        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24692            flag_type: "PositionTargetTypemask",
24693            value: tmp as u32,
24694        })?;
24695        let tmp = buf.get_u8();
24696        __struct.coordinate_frame =
24697            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24698                enum_type: "MavFrame",
24699                value: tmp as u32,
24700            })?;
24701        Ok(__struct)
24702    }
24703    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24704        let mut __tmp = BytesMut::new(bytes);
24705        #[allow(clippy::absurd_extreme_comparisons)]
24706        #[allow(unused_comparisons)]
24707        if __tmp.remaining() < Self::ENCODED_LEN {
24708            panic!(
24709                "buffer is too small (need {} bytes, but got {})",
24710                Self::ENCODED_LEN,
24711                __tmp.remaining(),
24712            )
24713        }
24714        __tmp.put_u32_le(self.time_boot_ms);
24715        __tmp.put_f32_le(self.x);
24716        __tmp.put_f32_le(self.y);
24717        __tmp.put_f32_le(self.z);
24718        __tmp.put_f32_le(self.vx);
24719        __tmp.put_f32_le(self.vy);
24720        __tmp.put_f32_le(self.vz);
24721        __tmp.put_f32_le(self.afx);
24722        __tmp.put_f32_le(self.afy);
24723        __tmp.put_f32_le(self.afz);
24724        __tmp.put_f32_le(self.yaw);
24725        __tmp.put_f32_le(self.yaw_rate);
24726        __tmp.put_u16_le(self.type_mask.bits());
24727        __tmp.put_u8(self.coordinate_frame as u8);
24728        if matches!(version, MavlinkVersion::V2) {
24729            let len = __tmp.len();
24730            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24731        } else {
24732            __tmp.len()
24733        }
24734    }
24735}
24736#[doc = "Power supply status."]
24737#[doc = ""]
24738#[doc = "ID: 125"]
24739#[derive(Debug, Clone, PartialEq)]
24740#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24741#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24742#[cfg_attr(feature = "ts", derive(TS))]
24743#[cfg_attr(feature = "ts", ts(export))]
24744pub struct POWER_STATUS_DATA {
24745    #[doc = "5V rail voltage."]
24746    pub Vcc: u16,
24747    #[doc = "Servo rail voltage."]
24748    pub Vservo: u16,
24749    #[doc = "Bitmap of power supply status flags."]
24750    pub flags: MavPowerStatus,
24751}
24752impl POWER_STATUS_DATA {
24753    pub const ENCODED_LEN: usize = 6usize;
24754    pub const DEFAULT: Self = Self {
24755        Vcc: 0_u16,
24756        Vservo: 0_u16,
24757        flags: MavPowerStatus::DEFAULT,
24758    };
24759    #[cfg(feature = "arbitrary")]
24760    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24761        use arbitrary::{Arbitrary, Unstructured};
24762        let mut buf = [0u8; 1024];
24763        rng.fill_bytes(&mut buf);
24764        let mut unstructured = Unstructured::new(&buf);
24765        Self::arbitrary(&mut unstructured).unwrap_or_default()
24766    }
24767}
24768impl Default for POWER_STATUS_DATA {
24769    fn default() -> Self {
24770        Self::DEFAULT.clone()
24771    }
24772}
24773impl MessageData for POWER_STATUS_DATA {
24774    type Message = MavMessage;
24775    const ID: u32 = 125u32;
24776    const NAME: &'static str = "POWER_STATUS";
24777    const EXTRA_CRC: u8 = 203u8;
24778    const ENCODED_LEN: usize = 6usize;
24779    fn deser(
24780        _version: MavlinkVersion,
24781        __input: &[u8],
24782    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24783        let avail_len = __input.len();
24784        let mut payload_buf = [0; Self::ENCODED_LEN];
24785        let mut buf = if avail_len < Self::ENCODED_LEN {
24786            payload_buf[0..avail_len].copy_from_slice(__input);
24787            Bytes::new(&payload_buf)
24788        } else {
24789            Bytes::new(__input)
24790        };
24791        let mut __struct = Self::default();
24792        __struct.Vcc = buf.get_u16_le();
24793        __struct.Vservo = buf.get_u16_le();
24794        let tmp = buf.get_u16_le();
24795        __struct.flags = MavPowerStatus::from_bits(tmp & MavPowerStatus::all().bits()).ok_or(
24796            ::mavlink_core::error::ParserError::InvalidFlag {
24797                flag_type: "MavPowerStatus",
24798                value: tmp as u32,
24799            },
24800        )?;
24801        Ok(__struct)
24802    }
24803    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24804        let mut __tmp = BytesMut::new(bytes);
24805        #[allow(clippy::absurd_extreme_comparisons)]
24806        #[allow(unused_comparisons)]
24807        if __tmp.remaining() < Self::ENCODED_LEN {
24808            panic!(
24809                "buffer is too small (need {} bytes, but got {})",
24810                Self::ENCODED_LEN,
24811                __tmp.remaining(),
24812            )
24813        }
24814        __tmp.put_u16_le(self.Vcc);
24815        __tmp.put_u16_le(self.Vservo);
24816        __tmp.put_u16_le(self.flags.bits());
24817        if matches!(version, MavlinkVersion::V2) {
24818            let len = __tmp.len();
24819            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24820        } else {
24821            __tmp.len()
24822        }
24823    }
24824}
24825#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
24826#[doc = ""]
24827#[doc = "ID: 300"]
24828#[derive(Debug, Clone, PartialEq)]
24829#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24830#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24831#[cfg_attr(feature = "ts", derive(TS))]
24832#[cfg_attr(feature = "ts", ts(export))]
24833pub struct PROTOCOL_VERSION_DATA {
24834    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
24835    pub version: u16,
24836    #[doc = "Minimum MAVLink version supported"]
24837    pub min_version: u16,
24838    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
24839    pub max_version: u16,
24840    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24841    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24842    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24843    pub spec_version_hash: [u8; 8],
24844    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24845    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24846    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24847    pub library_version_hash: [u8; 8],
24848}
24849impl PROTOCOL_VERSION_DATA {
24850    pub const ENCODED_LEN: usize = 22usize;
24851    pub const DEFAULT: Self = Self {
24852        version: 0_u16,
24853        min_version: 0_u16,
24854        max_version: 0_u16,
24855        spec_version_hash: [0_u8; 8usize],
24856        library_version_hash: [0_u8; 8usize],
24857    };
24858    #[cfg(feature = "arbitrary")]
24859    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24860        use arbitrary::{Arbitrary, Unstructured};
24861        let mut buf = [0u8; 1024];
24862        rng.fill_bytes(&mut buf);
24863        let mut unstructured = Unstructured::new(&buf);
24864        Self::arbitrary(&mut unstructured).unwrap_or_default()
24865    }
24866}
24867impl Default for PROTOCOL_VERSION_DATA {
24868    fn default() -> Self {
24869        Self::DEFAULT.clone()
24870    }
24871}
24872impl MessageData for PROTOCOL_VERSION_DATA {
24873    type Message = MavMessage;
24874    const ID: u32 = 300u32;
24875    const NAME: &'static str = "PROTOCOL_VERSION";
24876    const EXTRA_CRC: u8 = 217u8;
24877    const ENCODED_LEN: usize = 22usize;
24878    fn deser(
24879        _version: MavlinkVersion,
24880        __input: &[u8],
24881    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24882        let avail_len = __input.len();
24883        let mut payload_buf = [0; Self::ENCODED_LEN];
24884        let mut buf = if avail_len < Self::ENCODED_LEN {
24885            payload_buf[0..avail_len].copy_from_slice(__input);
24886            Bytes::new(&payload_buf)
24887        } else {
24888            Bytes::new(__input)
24889        };
24890        let mut __struct = Self::default();
24891        __struct.version = buf.get_u16_le();
24892        __struct.min_version = buf.get_u16_le();
24893        __struct.max_version = buf.get_u16_le();
24894        for v in &mut __struct.spec_version_hash {
24895            let val = buf.get_u8();
24896            *v = val;
24897        }
24898        for v in &mut __struct.library_version_hash {
24899            let val = buf.get_u8();
24900            *v = val;
24901        }
24902        Ok(__struct)
24903    }
24904    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24905        let mut __tmp = BytesMut::new(bytes);
24906        #[allow(clippy::absurd_extreme_comparisons)]
24907        #[allow(unused_comparisons)]
24908        if __tmp.remaining() < Self::ENCODED_LEN {
24909            panic!(
24910                "buffer is too small (need {} bytes, but got {})",
24911                Self::ENCODED_LEN,
24912                __tmp.remaining(),
24913            )
24914        }
24915        __tmp.put_u16_le(self.version);
24916        __tmp.put_u16_le(self.min_version);
24917        __tmp.put_u16_le(self.max_version);
24918        for val in &self.spec_version_hash {
24919            __tmp.put_u8(*val);
24920        }
24921        for val in &self.library_version_hash {
24922            __tmp.put_u8(*val);
24923        }
24924        if matches!(version, MavlinkVersion::V2) {
24925            let len = __tmp.len();
24926            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24927        } else {
24928            __tmp.len()
24929        }
24930    }
24931}
24932#[doc = "Complete set of calibration parameters for the radio."]
24933#[doc = ""]
24934#[doc = "ID: 221"]
24935#[derive(Debug, Clone, PartialEq)]
24936#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24937#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24938#[cfg_attr(feature = "ts", derive(TS))]
24939#[cfg_attr(feature = "ts", ts(export))]
24940pub struct RADIO_CALIBRATION_DATA {
24941    #[doc = "Aileron setpoints: left, center, right"]
24942    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24943    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24944    pub aileron: [u16; 3],
24945    #[doc = "Elevator setpoints: nose down, center, nose up"]
24946    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24947    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24948    pub elevator: [u16; 3],
24949    #[doc = "Rudder setpoints: nose left, center, nose right"]
24950    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24951    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24952    pub rudder: [u16; 3],
24953    #[doc = "Tail gyro mode/gain setpoints: heading hold, rate mode"]
24954    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24955    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24956    pub gyro: [u16; 2],
24957    #[doc = "Pitch curve setpoints (every 25%)"]
24958    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24959    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24960    pub pitch: [u16; 5],
24961    #[doc = "Throttle curve setpoints (every 25%)"]
24962    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24963    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24964    pub throttle: [u16; 5],
24965}
24966impl RADIO_CALIBRATION_DATA {
24967    pub const ENCODED_LEN: usize = 42usize;
24968    pub const DEFAULT: Self = Self {
24969        aileron: [0_u16; 3usize],
24970        elevator: [0_u16; 3usize],
24971        rudder: [0_u16; 3usize],
24972        gyro: [0_u16; 2usize],
24973        pitch: [0_u16; 5usize],
24974        throttle: [0_u16; 5usize],
24975    };
24976    #[cfg(feature = "arbitrary")]
24977    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24978        use arbitrary::{Arbitrary, Unstructured};
24979        let mut buf = [0u8; 1024];
24980        rng.fill_bytes(&mut buf);
24981        let mut unstructured = Unstructured::new(&buf);
24982        Self::arbitrary(&mut unstructured).unwrap_or_default()
24983    }
24984}
24985impl Default for RADIO_CALIBRATION_DATA {
24986    fn default() -> Self {
24987        Self::DEFAULT.clone()
24988    }
24989}
24990impl MessageData for RADIO_CALIBRATION_DATA {
24991    type Message = MavMessage;
24992    const ID: u32 = 221u32;
24993    const NAME: &'static str = "RADIO_CALIBRATION";
24994    const EXTRA_CRC: u8 = 71u8;
24995    const ENCODED_LEN: usize = 42usize;
24996    fn deser(
24997        _version: MavlinkVersion,
24998        __input: &[u8],
24999    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25000        let avail_len = __input.len();
25001        let mut payload_buf = [0; Self::ENCODED_LEN];
25002        let mut buf = if avail_len < Self::ENCODED_LEN {
25003            payload_buf[0..avail_len].copy_from_slice(__input);
25004            Bytes::new(&payload_buf)
25005        } else {
25006            Bytes::new(__input)
25007        };
25008        let mut __struct = Self::default();
25009        for v in &mut __struct.aileron {
25010            let val = buf.get_u16_le();
25011            *v = val;
25012        }
25013        for v in &mut __struct.elevator {
25014            let val = buf.get_u16_le();
25015            *v = val;
25016        }
25017        for v in &mut __struct.rudder {
25018            let val = buf.get_u16_le();
25019            *v = val;
25020        }
25021        for v in &mut __struct.gyro {
25022            let val = buf.get_u16_le();
25023            *v = val;
25024        }
25025        for v in &mut __struct.pitch {
25026            let val = buf.get_u16_le();
25027            *v = val;
25028        }
25029        for v in &mut __struct.throttle {
25030            let val = buf.get_u16_le();
25031            *v = val;
25032        }
25033        Ok(__struct)
25034    }
25035    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25036        let mut __tmp = BytesMut::new(bytes);
25037        #[allow(clippy::absurd_extreme_comparisons)]
25038        #[allow(unused_comparisons)]
25039        if __tmp.remaining() < Self::ENCODED_LEN {
25040            panic!(
25041                "buffer is too small (need {} bytes, but got {})",
25042                Self::ENCODED_LEN,
25043                __tmp.remaining(),
25044            )
25045        }
25046        for val in &self.aileron {
25047            __tmp.put_u16_le(*val);
25048        }
25049        for val in &self.elevator {
25050            __tmp.put_u16_le(*val);
25051        }
25052        for val in &self.rudder {
25053            __tmp.put_u16_le(*val);
25054        }
25055        for val in &self.gyro {
25056            __tmp.put_u16_le(*val);
25057        }
25058        for val in &self.pitch {
25059            __tmp.put_u16_le(*val);
25060        }
25061        for val in &self.throttle {
25062            __tmp.put_u16_le(*val);
25063        }
25064        if matches!(version, MavlinkVersion::V2) {
25065            let len = __tmp.len();
25066            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25067        } else {
25068            __tmp.len()
25069        }
25070    }
25071}
25072#[doc = "Status generated by radio and injected into MAVLink stream."]
25073#[doc = ""]
25074#[doc = "ID: 109"]
25075#[derive(Debug, Clone, PartialEq)]
25076#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25077#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25078#[cfg_attr(feature = "ts", derive(TS))]
25079#[cfg_attr(feature = "ts", ts(export))]
25080pub struct RADIO_STATUS_DATA {
25081    #[doc = "Count of radio packet receive errors (since boot)."]
25082    pub rxerrors: u16,
25083    #[doc = "Count of error corrected radio packets (since boot)."]
25084    pub fixed: u16,
25085    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25086    pub rssi: u8,
25087    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25088    pub remrssi: u8,
25089    #[doc = "Remaining free transmitter buffer space."]
25090    pub txbuf: u8,
25091    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25092    pub noise: u8,
25093    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25094    pub remnoise: u8,
25095}
25096impl RADIO_STATUS_DATA {
25097    pub const ENCODED_LEN: usize = 9usize;
25098    pub const DEFAULT: Self = Self {
25099        rxerrors: 0_u16,
25100        fixed: 0_u16,
25101        rssi: 0_u8,
25102        remrssi: 0_u8,
25103        txbuf: 0_u8,
25104        noise: 0_u8,
25105        remnoise: 0_u8,
25106    };
25107    #[cfg(feature = "arbitrary")]
25108    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25109        use arbitrary::{Arbitrary, Unstructured};
25110        let mut buf = [0u8; 1024];
25111        rng.fill_bytes(&mut buf);
25112        let mut unstructured = Unstructured::new(&buf);
25113        Self::arbitrary(&mut unstructured).unwrap_or_default()
25114    }
25115}
25116impl Default for RADIO_STATUS_DATA {
25117    fn default() -> Self {
25118        Self::DEFAULT.clone()
25119    }
25120}
25121impl MessageData for RADIO_STATUS_DATA {
25122    type Message = MavMessage;
25123    const ID: u32 = 109u32;
25124    const NAME: &'static str = "RADIO_STATUS";
25125    const EXTRA_CRC: u8 = 185u8;
25126    const ENCODED_LEN: usize = 9usize;
25127    fn deser(
25128        _version: MavlinkVersion,
25129        __input: &[u8],
25130    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25131        let avail_len = __input.len();
25132        let mut payload_buf = [0; Self::ENCODED_LEN];
25133        let mut buf = if avail_len < Self::ENCODED_LEN {
25134            payload_buf[0..avail_len].copy_from_slice(__input);
25135            Bytes::new(&payload_buf)
25136        } else {
25137            Bytes::new(__input)
25138        };
25139        let mut __struct = Self::default();
25140        __struct.rxerrors = buf.get_u16_le();
25141        __struct.fixed = buf.get_u16_le();
25142        __struct.rssi = buf.get_u8();
25143        __struct.remrssi = buf.get_u8();
25144        __struct.txbuf = buf.get_u8();
25145        __struct.noise = buf.get_u8();
25146        __struct.remnoise = buf.get_u8();
25147        Ok(__struct)
25148    }
25149    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25150        let mut __tmp = BytesMut::new(bytes);
25151        #[allow(clippy::absurd_extreme_comparisons)]
25152        #[allow(unused_comparisons)]
25153        if __tmp.remaining() < Self::ENCODED_LEN {
25154            panic!(
25155                "buffer is too small (need {} bytes, but got {})",
25156                Self::ENCODED_LEN,
25157                __tmp.remaining(),
25158            )
25159        }
25160        __tmp.put_u16_le(self.rxerrors);
25161        __tmp.put_u16_le(self.fixed);
25162        __tmp.put_u8(self.rssi);
25163        __tmp.put_u8(self.remrssi);
25164        __tmp.put_u8(self.txbuf);
25165        __tmp.put_u8(self.noise);
25166        __tmp.put_u8(self.remnoise);
25167        if matches!(version, MavlinkVersion::V2) {
25168            let len = __tmp.len();
25169            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25170        } else {
25171            __tmp.len()
25172        }
25173    }
25174}
25175#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
25176#[doc = ""]
25177#[doc = "ID: 27"]
25178#[derive(Debug, Clone, PartialEq)]
25179#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25180#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25181#[cfg_attr(feature = "ts", derive(TS))]
25182#[cfg_attr(feature = "ts", ts(export))]
25183pub struct RAW_IMU_DATA {
25184    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25185    pub time_usec: u64,
25186    #[doc = "X acceleration (raw)"]
25187    pub xacc: i16,
25188    #[doc = "Y acceleration (raw)"]
25189    pub yacc: i16,
25190    #[doc = "Z acceleration (raw)"]
25191    pub zacc: i16,
25192    #[doc = "Angular speed around X axis (raw)"]
25193    pub xgyro: i16,
25194    #[doc = "Angular speed around Y axis (raw)"]
25195    pub ygyro: i16,
25196    #[doc = "Angular speed around Z axis (raw)"]
25197    pub zgyro: i16,
25198    #[doc = "X Magnetic field (raw)"]
25199    pub xmag: i16,
25200    #[doc = "Y Magnetic field (raw)"]
25201    pub ymag: i16,
25202    #[doc = "Z Magnetic field (raw)"]
25203    pub zmag: i16,
25204    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
25205    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25206    pub id: u8,
25207    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25208    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25209    pub temperature: i16,
25210}
25211impl RAW_IMU_DATA {
25212    pub const ENCODED_LEN: usize = 29usize;
25213    pub const DEFAULT: Self = Self {
25214        time_usec: 0_u64,
25215        xacc: 0_i16,
25216        yacc: 0_i16,
25217        zacc: 0_i16,
25218        xgyro: 0_i16,
25219        ygyro: 0_i16,
25220        zgyro: 0_i16,
25221        xmag: 0_i16,
25222        ymag: 0_i16,
25223        zmag: 0_i16,
25224        id: 0_u8,
25225        temperature: 0_i16,
25226    };
25227    #[cfg(feature = "arbitrary")]
25228    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25229        use arbitrary::{Arbitrary, Unstructured};
25230        let mut buf = [0u8; 1024];
25231        rng.fill_bytes(&mut buf);
25232        let mut unstructured = Unstructured::new(&buf);
25233        Self::arbitrary(&mut unstructured).unwrap_or_default()
25234    }
25235}
25236impl Default for RAW_IMU_DATA {
25237    fn default() -> Self {
25238        Self::DEFAULT.clone()
25239    }
25240}
25241impl MessageData for RAW_IMU_DATA {
25242    type Message = MavMessage;
25243    const ID: u32 = 27u32;
25244    const NAME: &'static str = "RAW_IMU";
25245    const EXTRA_CRC: u8 = 144u8;
25246    const ENCODED_LEN: usize = 29usize;
25247    fn deser(
25248        _version: MavlinkVersion,
25249        __input: &[u8],
25250    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25251        let avail_len = __input.len();
25252        let mut payload_buf = [0; Self::ENCODED_LEN];
25253        let mut buf = if avail_len < Self::ENCODED_LEN {
25254            payload_buf[0..avail_len].copy_from_slice(__input);
25255            Bytes::new(&payload_buf)
25256        } else {
25257            Bytes::new(__input)
25258        };
25259        let mut __struct = Self::default();
25260        __struct.time_usec = buf.get_u64_le();
25261        __struct.xacc = buf.get_i16_le();
25262        __struct.yacc = buf.get_i16_le();
25263        __struct.zacc = buf.get_i16_le();
25264        __struct.xgyro = buf.get_i16_le();
25265        __struct.ygyro = buf.get_i16_le();
25266        __struct.zgyro = buf.get_i16_le();
25267        __struct.xmag = buf.get_i16_le();
25268        __struct.ymag = buf.get_i16_le();
25269        __struct.zmag = buf.get_i16_le();
25270        __struct.id = buf.get_u8();
25271        __struct.temperature = buf.get_i16_le();
25272        Ok(__struct)
25273    }
25274    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25275        let mut __tmp = BytesMut::new(bytes);
25276        #[allow(clippy::absurd_extreme_comparisons)]
25277        #[allow(unused_comparisons)]
25278        if __tmp.remaining() < Self::ENCODED_LEN {
25279            panic!(
25280                "buffer is too small (need {} bytes, but got {})",
25281                Self::ENCODED_LEN,
25282                __tmp.remaining(),
25283            )
25284        }
25285        __tmp.put_u64_le(self.time_usec);
25286        __tmp.put_i16_le(self.xacc);
25287        __tmp.put_i16_le(self.yacc);
25288        __tmp.put_i16_le(self.zacc);
25289        __tmp.put_i16_le(self.xgyro);
25290        __tmp.put_i16_le(self.ygyro);
25291        __tmp.put_i16_le(self.zgyro);
25292        __tmp.put_i16_le(self.xmag);
25293        __tmp.put_i16_le(self.ymag);
25294        __tmp.put_i16_le(self.zmag);
25295        if matches!(version, MavlinkVersion::V2) {
25296            __tmp.put_u8(self.id);
25297            __tmp.put_i16_le(self.temperature);
25298            let len = __tmp.len();
25299            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25300        } else {
25301            __tmp.len()
25302        }
25303    }
25304}
25305#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
25306#[doc = ""]
25307#[doc = "ID: 28"]
25308#[derive(Debug, Clone, PartialEq)]
25309#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25310#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25311#[cfg_attr(feature = "ts", derive(TS))]
25312#[cfg_attr(feature = "ts", ts(export))]
25313pub struct RAW_PRESSURE_DATA {
25314    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25315    pub time_usec: u64,
25316    #[doc = "Absolute pressure (raw)"]
25317    pub press_abs: i16,
25318    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
25319    pub press_diff1: i16,
25320    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
25321    pub press_diff2: i16,
25322    #[doc = "Raw Temperature measurement (raw)"]
25323    pub temperature: i16,
25324}
25325impl RAW_PRESSURE_DATA {
25326    pub const ENCODED_LEN: usize = 16usize;
25327    pub const DEFAULT: Self = Self {
25328        time_usec: 0_u64,
25329        press_abs: 0_i16,
25330        press_diff1: 0_i16,
25331        press_diff2: 0_i16,
25332        temperature: 0_i16,
25333    };
25334    #[cfg(feature = "arbitrary")]
25335    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25336        use arbitrary::{Arbitrary, Unstructured};
25337        let mut buf = [0u8; 1024];
25338        rng.fill_bytes(&mut buf);
25339        let mut unstructured = Unstructured::new(&buf);
25340        Self::arbitrary(&mut unstructured).unwrap_or_default()
25341    }
25342}
25343impl Default for RAW_PRESSURE_DATA {
25344    fn default() -> Self {
25345        Self::DEFAULT.clone()
25346    }
25347}
25348impl MessageData for RAW_PRESSURE_DATA {
25349    type Message = MavMessage;
25350    const ID: u32 = 28u32;
25351    const NAME: &'static str = "RAW_PRESSURE";
25352    const EXTRA_CRC: u8 = 67u8;
25353    const ENCODED_LEN: usize = 16usize;
25354    fn deser(
25355        _version: MavlinkVersion,
25356        __input: &[u8],
25357    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25358        let avail_len = __input.len();
25359        let mut payload_buf = [0; Self::ENCODED_LEN];
25360        let mut buf = if avail_len < Self::ENCODED_LEN {
25361            payload_buf[0..avail_len].copy_from_slice(__input);
25362            Bytes::new(&payload_buf)
25363        } else {
25364            Bytes::new(__input)
25365        };
25366        let mut __struct = Self::default();
25367        __struct.time_usec = buf.get_u64_le();
25368        __struct.press_abs = buf.get_i16_le();
25369        __struct.press_diff1 = buf.get_i16_le();
25370        __struct.press_diff2 = buf.get_i16_le();
25371        __struct.temperature = buf.get_i16_le();
25372        Ok(__struct)
25373    }
25374    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25375        let mut __tmp = BytesMut::new(bytes);
25376        #[allow(clippy::absurd_extreme_comparisons)]
25377        #[allow(unused_comparisons)]
25378        if __tmp.remaining() < Self::ENCODED_LEN {
25379            panic!(
25380                "buffer is too small (need {} bytes, but got {})",
25381                Self::ENCODED_LEN,
25382                __tmp.remaining(),
25383            )
25384        }
25385        __tmp.put_u64_le(self.time_usec);
25386        __tmp.put_i16_le(self.press_abs);
25387        __tmp.put_i16_le(self.press_diff1);
25388        __tmp.put_i16_le(self.press_diff2);
25389        __tmp.put_i16_le(self.temperature);
25390        if matches!(version, MavlinkVersion::V2) {
25391            let len = __tmp.len();
25392            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25393        } else {
25394            __tmp.len()
25395        }
25396    }
25397}
25398#[doc = "RPM sensor data message."]
25399#[doc = ""]
25400#[doc = "ID: 339"]
25401#[derive(Debug, Clone, PartialEq)]
25402#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25403#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25404#[cfg_attr(feature = "ts", derive(TS))]
25405#[cfg_attr(feature = "ts", ts(export))]
25406pub struct RAW_RPM_DATA {
25407    #[doc = "Indicated rate"]
25408    pub frequency: f32,
25409    #[doc = "Index of this RPM sensor (0-indexed)"]
25410    pub index: u8,
25411}
25412impl RAW_RPM_DATA {
25413    pub const ENCODED_LEN: usize = 5usize;
25414    pub const DEFAULT: Self = Self {
25415        frequency: 0.0_f32,
25416        index: 0_u8,
25417    };
25418    #[cfg(feature = "arbitrary")]
25419    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25420        use arbitrary::{Arbitrary, Unstructured};
25421        let mut buf = [0u8; 1024];
25422        rng.fill_bytes(&mut buf);
25423        let mut unstructured = Unstructured::new(&buf);
25424        Self::arbitrary(&mut unstructured).unwrap_or_default()
25425    }
25426}
25427impl Default for RAW_RPM_DATA {
25428    fn default() -> Self {
25429        Self::DEFAULT.clone()
25430    }
25431}
25432impl MessageData for RAW_RPM_DATA {
25433    type Message = MavMessage;
25434    const ID: u32 = 339u32;
25435    const NAME: &'static str = "RAW_RPM";
25436    const EXTRA_CRC: u8 = 199u8;
25437    const ENCODED_LEN: usize = 5usize;
25438    fn deser(
25439        _version: MavlinkVersion,
25440        __input: &[u8],
25441    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25442        let avail_len = __input.len();
25443        let mut payload_buf = [0; Self::ENCODED_LEN];
25444        let mut buf = if avail_len < Self::ENCODED_LEN {
25445            payload_buf[0..avail_len].copy_from_slice(__input);
25446            Bytes::new(&payload_buf)
25447        } else {
25448            Bytes::new(__input)
25449        };
25450        let mut __struct = Self::default();
25451        __struct.frequency = buf.get_f32_le();
25452        __struct.index = buf.get_u8();
25453        Ok(__struct)
25454    }
25455    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25456        let mut __tmp = BytesMut::new(bytes);
25457        #[allow(clippy::absurd_extreme_comparisons)]
25458        #[allow(unused_comparisons)]
25459        if __tmp.remaining() < Self::ENCODED_LEN {
25460            panic!(
25461                "buffer is too small (need {} bytes, but got {})",
25462                Self::ENCODED_LEN,
25463                __tmp.remaining(),
25464            )
25465        }
25466        __tmp.put_f32_le(self.frequency);
25467        __tmp.put_u8(self.index);
25468        if matches!(version, MavlinkVersion::V2) {
25469            let len = __tmp.len();
25470            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25471        } else {
25472            __tmp.len()
25473        }
25474    }
25475}
25476#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25477#[doc = ""]
25478#[doc = "ID: 65"]
25479#[derive(Debug, Clone, PartialEq)]
25480#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25481#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25482#[cfg_attr(feature = "ts", derive(TS))]
25483#[cfg_attr(feature = "ts", ts(export))]
25484pub struct RC_CHANNELS_DATA {
25485    #[doc = "Timestamp (time since system boot)."]
25486    pub time_boot_ms: u32,
25487    #[doc = "RC channel 1 value."]
25488    pub chan1_raw: u16,
25489    #[doc = "RC channel 2 value."]
25490    pub chan2_raw: u16,
25491    #[doc = "RC channel 3 value."]
25492    pub chan3_raw: u16,
25493    #[doc = "RC channel 4 value."]
25494    pub chan4_raw: u16,
25495    #[doc = "RC channel 5 value."]
25496    pub chan5_raw: u16,
25497    #[doc = "RC channel 6 value."]
25498    pub chan6_raw: u16,
25499    #[doc = "RC channel 7 value."]
25500    pub chan7_raw: u16,
25501    #[doc = "RC channel 8 value."]
25502    pub chan8_raw: u16,
25503    #[doc = "RC channel 9 value."]
25504    pub chan9_raw: u16,
25505    #[doc = "RC channel 10 value."]
25506    pub chan10_raw: u16,
25507    #[doc = "RC channel 11 value."]
25508    pub chan11_raw: u16,
25509    #[doc = "RC channel 12 value."]
25510    pub chan12_raw: u16,
25511    #[doc = "RC channel 13 value."]
25512    pub chan13_raw: u16,
25513    #[doc = "RC channel 14 value."]
25514    pub chan14_raw: u16,
25515    #[doc = "RC channel 15 value."]
25516    pub chan15_raw: u16,
25517    #[doc = "RC channel 16 value."]
25518    pub chan16_raw: u16,
25519    #[doc = "RC channel 17 value."]
25520    pub chan17_raw: u16,
25521    #[doc = "RC channel 18 value."]
25522    pub chan18_raw: u16,
25523    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
25524    pub chancount: u8,
25525    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25526    pub rssi: u8,
25527}
25528impl RC_CHANNELS_DATA {
25529    pub const ENCODED_LEN: usize = 42usize;
25530    pub const DEFAULT: Self = Self {
25531        time_boot_ms: 0_u32,
25532        chan1_raw: 0_u16,
25533        chan2_raw: 0_u16,
25534        chan3_raw: 0_u16,
25535        chan4_raw: 0_u16,
25536        chan5_raw: 0_u16,
25537        chan6_raw: 0_u16,
25538        chan7_raw: 0_u16,
25539        chan8_raw: 0_u16,
25540        chan9_raw: 0_u16,
25541        chan10_raw: 0_u16,
25542        chan11_raw: 0_u16,
25543        chan12_raw: 0_u16,
25544        chan13_raw: 0_u16,
25545        chan14_raw: 0_u16,
25546        chan15_raw: 0_u16,
25547        chan16_raw: 0_u16,
25548        chan17_raw: 0_u16,
25549        chan18_raw: 0_u16,
25550        chancount: 0_u8,
25551        rssi: 0_u8,
25552    };
25553    #[cfg(feature = "arbitrary")]
25554    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25555        use arbitrary::{Arbitrary, Unstructured};
25556        let mut buf = [0u8; 1024];
25557        rng.fill_bytes(&mut buf);
25558        let mut unstructured = Unstructured::new(&buf);
25559        Self::arbitrary(&mut unstructured).unwrap_or_default()
25560    }
25561}
25562impl Default for RC_CHANNELS_DATA {
25563    fn default() -> Self {
25564        Self::DEFAULT.clone()
25565    }
25566}
25567impl MessageData for RC_CHANNELS_DATA {
25568    type Message = MavMessage;
25569    const ID: u32 = 65u32;
25570    const NAME: &'static str = "RC_CHANNELS";
25571    const EXTRA_CRC: u8 = 118u8;
25572    const ENCODED_LEN: usize = 42usize;
25573    fn deser(
25574        _version: MavlinkVersion,
25575        __input: &[u8],
25576    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25577        let avail_len = __input.len();
25578        let mut payload_buf = [0; Self::ENCODED_LEN];
25579        let mut buf = if avail_len < Self::ENCODED_LEN {
25580            payload_buf[0..avail_len].copy_from_slice(__input);
25581            Bytes::new(&payload_buf)
25582        } else {
25583            Bytes::new(__input)
25584        };
25585        let mut __struct = Self::default();
25586        __struct.time_boot_ms = buf.get_u32_le();
25587        __struct.chan1_raw = buf.get_u16_le();
25588        __struct.chan2_raw = buf.get_u16_le();
25589        __struct.chan3_raw = buf.get_u16_le();
25590        __struct.chan4_raw = buf.get_u16_le();
25591        __struct.chan5_raw = buf.get_u16_le();
25592        __struct.chan6_raw = buf.get_u16_le();
25593        __struct.chan7_raw = buf.get_u16_le();
25594        __struct.chan8_raw = buf.get_u16_le();
25595        __struct.chan9_raw = buf.get_u16_le();
25596        __struct.chan10_raw = buf.get_u16_le();
25597        __struct.chan11_raw = buf.get_u16_le();
25598        __struct.chan12_raw = buf.get_u16_le();
25599        __struct.chan13_raw = buf.get_u16_le();
25600        __struct.chan14_raw = buf.get_u16_le();
25601        __struct.chan15_raw = buf.get_u16_le();
25602        __struct.chan16_raw = buf.get_u16_le();
25603        __struct.chan17_raw = buf.get_u16_le();
25604        __struct.chan18_raw = buf.get_u16_le();
25605        __struct.chancount = buf.get_u8();
25606        __struct.rssi = buf.get_u8();
25607        Ok(__struct)
25608    }
25609    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25610        let mut __tmp = BytesMut::new(bytes);
25611        #[allow(clippy::absurd_extreme_comparisons)]
25612        #[allow(unused_comparisons)]
25613        if __tmp.remaining() < Self::ENCODED_LEN {
25614            panic!(
25615                "buffer is too small (need {} bytes, but got {})",
25616                Self::ENCODED_LEN,
25617                __tmp.remaining(),
25618            )
25619        }
25620        __tmp.put_u32_le(self.time_boot_ms);
25621        __tmp.put_u16_le(self.chan1_raw);
25622        __tmp.put_u16_le(self.chan2_raw);
25623        __tmp.put_u16_le(self.chan3_raw);
25624        __tmp.put_u16_le(self.chan4_raw);
25625        __tmp.put_u16_le(self.chan5_raw);
25626        __tmp.put_u16_le(self.chan6_raw);
25627        __tmp.put_u16_le(self.chan7_raw);
25628        __tmp.put_u16_le(self.chan8_raw);
25629        __tmp.put_u16_le(self.chan9_raw);
25630        __tmp.put_u16_le(self.chan10_raw);
25631        __tmp.put_u16_le(self.chan11_raw);
25632        __tmp.put_u16_le(self.chan12_raw);
25633        __tmp.put_u16_le(self.chan13_raw);
25634        __tmp.put_u16_le(self.chan14_raw);
25635        __tmp.put_u16_le(self.chan15_raw);
25636        __tmp.put_u16_le(self.chan16_raw);
25637        __tmp.put_u16_le(self.chan17_raw);
25638        __tmp.put_u16_le(self.chan18_raw);
25639        __tmp.put_u8(self.chancount);
25640        __tmp.put_u8(self.rssi);
25641        if matches!(version, MavlinkVersion::V2) {
25642            let len = __tmp.len();
25643            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25644        } else {
25645            __tmp.len()
25646        }
25647    }
25648}
25649#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
25650#[doc = ""]
25651#[doc = "ID: 70"]
25652#[derive(Debug, Clone, PartialEq)]
25653#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25654#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25655#[cfg_attr(feature = "ts", derive(TS))]
25656#[cfg_attr(feature = "ts", ts(export))]
25657pub struct RC_CHANNELS_OVERRIDE_DATA {
25658    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25659    pub chan1_raw: u16,
25660    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25661    pub chan2_raw: u16,
25662    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25663    pub chan3_raw: u16,
25664    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25665    pub chan4_raw: u16,
25666    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25667    pub chan5_raw: u16,
25668    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25669    pub chan6_raw: u16,
25670    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25671    pub chan7_raw: u16,
25672    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25673    pub chan8_raw: u16,
25674    #[doc = "System ID"]
25675    pub target_system: u8,
25676    #[doc = "Component ID"]
25677    pub target_component: u8,
25678    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25679    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25680    pub chan9_raw: u16,
25681    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25682    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25683    pub chan10_raw: u16,
25684    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25685    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25686    pub chan11_raw: u16,
25687    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25688    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25689    pub chan12_raw: u16,
25690    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25691    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25692    pub chan13_raw: u16,
25693    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25694    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25695    pub chan14_raw: u16,
25696    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25697    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25698    pub chan15_raw: u16,
25699    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25700    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25701    pub chan16_raw: u16,
25702    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25703    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25704    pub chan17_raw: u16,
25705    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25706    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25707    pub chan18_raw: u16,
25708}
25709impl RC_CHANNELS_OVERRIDE_DATA {
25710    pub const ENCODED_LEN: usize = 38usize;
25711    pub const DEFAULT: Self = Self {
25712        chan1_raw: 0_u16,
25713        chan2_raw: 0_u16,
25714        chan3_raw: 0_u16,
25715        chan4_raw: 0_u16,
25716        chan5_raw: 0_u16,
25717        chan6_raw: 0_u16,
25718        chan7_raw: 0_u16,
25719        chan8_raw: 0_u16,
25720        target_system: 0_u8,
25721        target_component: 0_u8,
25722        chan9_raw: 0_u16,
25723        chan10_raw: 0_u16,
25724        chan11_raw: 0_u16,
25725        chan12_raw: 0_u16,
25726        chan13_raw: 0_u16,
25727        chan14_raw: 0_u16,
25728        chan15_raw: 0_u16,
25729        chan16_raw: 0_u16,
25730        chan17_raw: 0_u16,
25731        chan18_raw: 0_u16,
25732    };
25733    #[cfg(feature = "arbitrary")]
25734    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25735        use arbitrary::{Arbitrary, Unstructured};
25736        let mut buf = [0u8; 1024];
25737        rng.fill_bytes(&mut buf);
25738        let mut unstructured = Unstructured::new(&buf);
25739        Self::arbitrary(&mut unstructured).unwrap_or_default()
25740    }
25741}
25742impl Default for RC_CHANNELS_OVERRIDE_DATA {
25743    fn default() -> Self {
25744        Self::DEFAULT.clone()
25745    }
25746}
25747impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
25748    type Message = MavMessage;
25749    const ID: u32 = 70u32;
25750    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
25751    const EXTRA_CRC: u8 = 124u8;
25752    const ENCODED_LEN: usize = 38usize;
25753    fn deser(
25754        _version: MavlinkVersion,
25755        __input: &[u8],
25756    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25757        let avail_len = __input.len();
25758        let mut payload_buf = [0; Self::ENCODED_LEN];
25759        let mut buf = if avail_len < Self::ENCODED_LEN {
25760            payload_buf[0..avail_len].copy_from_slice(__input);
25761            Bytes::new(&payload_buf)
25762        } else {
25763            Bytes::new(__input)
25764        };
25765        let mut __struct = Self::default();
25766        __struct.chan1_raw = buf.get_u16_le();
25767        __struct.chan2_raw = buf.get_u16_le();
25768        __struct.chan3_raw = buf.get_u16_le();
25769        __struct.chan4_raw = buf.get_u16_le();
25770        __struct.chan5_raw = buf.get_u16_le();
25771        __struct.chan6_raw = buf.get_u16_le();
25772        __struct.chan7_raw = buf.get_u16_le();
25773        __struct.chan8_raw = buf.get_u16_le();
25774        __struct.target_system = buf.get_u8();
25775        __struct.target_component = buf.get_u8();
25776        __struct.chan9_raw = buf.get_u16_le();
25777        __struct.chan10_raw = buf.get_u16_le();
25778        __struct.chan11_raw = buf.get_u16_le();
25779        __struct.chan12_raw = buf.get_u16_le();
25780        __struct.chan13_raw = buf.get_u16_le();
25781        __struct.chan14_raw = buf.get_u16_le();
25782        __struct.chan15_raw = buf.get_u16_le();
25783        __struct.chan16_raw = buf.get_u16_le();
25784        __struct.chan17_raw = buf.get_u16_le();
25785        __struct.chan18_raw = buf.get_u16_le();
25786        Ok(__struct)
25787    }
25788    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25789        let mut __tmp = BytesMut::new(bytes);
25790        #[allow(clippy::absurd_extreme_comparisons)]
25791        #[allow(unused_comparisons)]
25792        if __tmp.remaining() < Self::ENCODED_LEN {
25793            panic!(
25794                "buffer is too small (need {} bytes, but got {})",
25795                Self::ENCODED_LEN,
25796                __tmp.remaining(),
25797            )
25798        }
25799        __tmp.put_u16_le(self.chan1_raw);
25800        __tmp.put_u16_le(self.chan2_raw);
25801        __tmp.put_u16_le(self.chan3_raw);
25802        __tmp.put_u16_le(self.chan4_raw);
25803        __tmp.put_u16_le(self.chan5_raw);
25804        __tmp.put_u16_le(self.chan6_raw);
25805        __tmp.put_u16_le(self.chan7_raw);
25806        __tmp.put_u16_le(self.chan8_raw);
25807        __tmp.put_u8(self.target_system);
25808        __tmp.put_u8(self.target_component);
25809        if matches!(version, MavlinkVersion::V2) {
25810            __tmp.put_u16_le(self.chan9_raw);
25811            __tmp.put_u16_le(self.chan10_raw);
25812            __tmp.put_u16_le(self.chan11_raw);
25813            __tmp.put_u16_le(self.chan12_raw);
25814            __tmp.put_u16_le(self.chan13_raw);
25815            __tmp.put_u16_le(self.chan14_raw);
25816            __tmp.put_u16_le(self.chan15_raw);
25817            __tmp.put_u16_le(self.chan16_raw);
25818            __tmp.put_u16_le(self.chan17_raw);
25819            __tmp.put_u16_le(self.chan18_raw);
25820            let len = __tmp.len();
25821            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25822        } else {
25823            __tmp.len()
25824        }
25825    }
25826}
25827#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25828#[doc = ""]
25829#[doc = "ID: 35"]
25830#[derive(Debug, Clone, PartialEq)]
25831#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25832#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25833#[cfg_attr(feature = "ts", derive(TS))]
25834#[cfg_attr(feature = "ts", ts(export))]
25835pub struct RC_CHANNELS_RAW_DATA {
25836    #[doc = "Timestamp (time since system boot)."]
25837    pub time_boot_ms: u32,
25838    #[doc = "RC channel 1 value."]
25839    pub chan1_raw: u16,
25840    #[doc = "RC channel 2 value."]
25841    pub chan2_raw: u16,
25842    #[doc = "RC channel 3 value."]
25843    pub chan3_raw: u16,
25844    #[doc = "RC channel 4 value."]
25845    pub chan4_raw: u16,
25846    #[doc = "RC channel 5 value."]
25847    pub chan5_raw: u16,
25848    #[doc = "RC channel 6 value."]
25849    pub chan6_raw: u16,
25850    #[doc = "RC channel 7 value."]
25851    pub chan7_raw: u16,
25852    #[doc = "RC channel 8 value."]
25853    pub chan8_raw: u16,
25854    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25855    pub port: u8,
25856    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25857    pub rssi: u8,
25858}
25859impl RC_CHANNELS_RAW_DATA {
25860    pub const ENCODED_LEN: usize = 22usize;
25861    pub const DEFAULT: Self = Self {
25862        time_boot_ms: 0_u32,
25863        chan1_raw: 0_u16,
25864        chan2_raw: 0_u16,
25865        chan3_raw: 0_u16,
25866        chan4_raw: 0_u16,
25867        chan5_raw: 0_u16,
25868        chan6_raw: 0_u16,
25869        chan7_raw: 0_u16,
25870        chan8_raw: 0_u16,
25871        port: 0_u8,
25872        rssi: 0_u8,
25873    };
25874    #[cfg(feature = "arbitrary")]
25875    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25876        use arbitrary::{Arbitrary, Unstructured};
25877        let mut buf = [0u8; 1024];
25878        rng.fill_bytes(&mut buf);
25879        let mut unstructured = Unstructured::new(&buf);
25880        Self::arbitrary(&mut unstructured).unwrap_or_default()
25881    }
25882}
25883impl Default for RC_CHANNELS_RAW_DATA {
25884    fn default() -> Self {
25885        Self::DEFAULT.clone()
25886    }
25887}
25888impl MessageData for RC_CHANNELS_RAW_DATA {
25889    type Message = MavMessage;
25890    const ID: u32 = 35u32;
25891    const NAME: &'static str = "RC_CHANNELS_RAW";
25892    const EXTRA_CRC: u8 = 244u8;
25893    const ENCODED_LEN: usize = 22usize;
25894    fn deser(
25895        _version: MavlinkVersion,
25896        __input: &[u8],
25897    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25898        let avail_len = __input.len();
25899        let mut payload_buf = [0; Self::ENCODED_LEN];
25900        let mut buf = if avail_len < Self::ENCODED_LEN {
25901            payload_buf[0..avail_len].copy_from_slice(__input);
25902            Bytes::new(&payload_buf)
25903        } else {
25904            Bytes::new(__input)
25905        };
25906        let mut __struct = Self::default();
25907        __struct.time_boot_ms = buf.get_u32_le();
25908        __struct.chan1_raw = buf.get_u16_le();
25909        __struct.chan2_raw = buf.get_u16_le();
25910        __struct.chan3_raw = buf.get_u16_le();
25911        __struct.chan4_raw = buf.get_u16_le();
25912        __struct.chan5_raw = buf.get_u16_le();
25913        __struct.chan6_raw = buf.get_u16_le();
25914        __struct.chan7_raw = buf.get_u16_le();
25915        __struct.chan8_raw = buf.get_u16_le();
25916        __struct.port = buf.get_u8();
25917        __struct.rssi = buf.get_u8();
25918        Ok(__struct)
25919    }
25920    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25921        let mut __tmp = BytesMut::new(bytes);
25922        #[allow(clippy::absurd_extreme_comparisons)]
25923        #[allow(unused_comparisons)]
25924        if __tmp.remaining() < Self::ENCODED_LEN {
25925            panic!(
25926                "buffer is too small (need {} bytes, but got {})",
25927                Self::ENCODED_LEN,
25928                __tmp.remaining(),
25929            )
25930        }
25931        __tmp.put_u32_le(self.time_boot_ms);
25932        __tmp.put_u16_le(self.chan1_raw);
25933        __tmp.put_u16_le(self.chan2_raw);
25934        __tmp.put_u16_le(self.chan3_raw);
25935        __tmp.put_u16_le(self.chan4_raw);
25936        __tmp.put_u16_le(self.chan5_raw);
25937        __tmp.put_u16_le(self.chan6_raw);
25938        __tmp.put_u16_le(self.chan7_raw);
25939        __tmp.put_u16_le(self.chan8_raw);
25940        __tmp.put_u8(self.port);
25941        __tmp.put_u8(self.rssi);
25942        if matches!(version, MavlinkVersion::V2) {
25943            let len = __tmp.len();
25944            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25945        } else {
25946            __tmp.len()
25947        }
25948    }
25949}
25950#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
25951#[doc = ""]
25952#[doc = "ID: 34"]
25953#[derive(Debug, Clone, PartialEq)]
25954#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25955#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25956#[cfg_attr(feature = "ts", derive(TS))]
25957#[cfg_attr(feature = "ts", ts(export))]
25958pub struct RC_CHANNELS_SCALED_DATA {
25959    #[doc = "Timestamp (time since system boot)."]
25960    pub time_boot_ms: u32,
25961    #[doc = "RC channel 1 value scaled."]
25962    pub chan1_scaled: i16,
25963    #[doc = "RC channel 2 value scaled."]
25964    pub chan2_scaled: i16,
25965    #[doc = "RC channel 3 value scaled."]
25966    pub chan3_scaled: i16,
25967    #[doc = "RC channel 4 value scaled."]
25968    pub chan4_scaled: i16,
25969    #[doc = "RC channel 5 value scaled."]
25970    pub chan5_scaled: i16,
25971    #[doc = "RC channel 6 value scaled."]
25972    pub chan6_scaled: i16,
25973    #[doc = "RC channel 7 value scaled."]
25974    pub chan7_scaled: i16,
25975    #[doc = "RC channel 8 value scaled."]
25976    pub chan8_scaled: i16,
25977    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25978    pub port: u8,
25979    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25980    pub rssi: u8,
25981}
25982impl RC_CHANNELS_SCALED_DATA {
25983    pub const ENCODED_LEN: usize = 22usize;
25984    pub const DEFAULT: Self = Self {
25985        time_boot_ms: 0_u32,
25986        chan1_scaled: 0_i16,
25987        chan2_scaled: 0_i16,
25988        chan3_scaled: 0_i16,
25989        chan4_scaled: 0_i16,
25990        chan5_scaled: 0_i16,
25991        chan6_scaled: 0_i16,
25992        chan7_scaled: 0_i16,
25993        chan8_scaled: 0_i16,
25994        port: 0_u8,
25995        rssi: 0_u8,
25996    };
25997    #[cfg(feature = "arbitrary")]
25998    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25999        use arbitrary::{Arbitrary, Unstructured};
26000        let mut buf = [0u8; 1024];
26001        rng.fill_bytes(&mut buf);
26002        let mut unstructured = Unstructured::new(&buf);
26003        Self::arbitrary(&mut unstructured).unwrap_or_default()
26004    }
26005}
26006impl Default for RC_CHANNELS_SCALED_DATA {
26007    fn default() -> Self {
26008        Self::DEFAULT.clone()
26009    }
26010}
26011impl MessageData for RC_CHANNELS_SCALED_DATA {
26012    type Message = MavMessage;
26013    const ID: u32 = 34u32;
26014    const NAME: &'static str = "RC_CHANNELS_SCALED";
26015    const EXTRA_CRC: u8 = 237u8;
26016    const ENCODED_LEN: usize = 22usize;
26017    fn deser(
26018        _version: MavlinkVersion,
26019        __input: &[u8],
26020    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26021        let avail_len = __input.len();
26022        let mut payload_buf = [0; Self::ENCODED_LEN];
26023        let mut buf = if avail_len < Self::ENCODED_LEN {
26024            payload_buf[0..avail_len].copy_from_slice(__input);
26025            Bytes::new(&payload_buf)
26026        } else {
26027            Bytes::new(__input)
26028        };
26029        let mut __struct = Self::default();
26030        __struct.time_boot_ms = buf.get_u32_le();
26031        __struct.chan1_scaled = buf.get_i16_le();
26032        __struct.chan2_scaled = buf.get_i16_le();
26033        __struct.chan3_scaled = buf.get_i16_le();
26034        __struct.chan4_scaled = buf.get_i16_le();
26035        __struct.chan5_scaled = buf.get_i16_le();
26036        __struct.chan6_scaled = buf.get_i16_le();
26037        __struct.chan7_scaled = buf.get_i16_le();
26038        __struct.chan8_scaled = buf.get_i16_le();
26039        __struct.port = buf.get_u8();
26040        __struct.rssi = buf.get_u8();
26041        Ok(__struct)
26042    }
26043    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26044        let mut __tmp = BytesMut::new(bytes);
26045        #[allow(clippy::absurd_extreme_comparisons)]
26046        #[allow(unused_comparisons)]
26047        if __tmp.remaining() < Self::ENCODED_LEN {
26048            panic!(
26049                "buffer is too small (need {} bytes, but got {})",
26050                Self::ENCODED_LEN,
26051                __tmp.remaining(),
26052            )
26053        }
26054        __tmp.put_u32_le(self.time_boot_ms);
26055        __tmp.put_i16_le(self.chan1_scaled);
26056        __tmp.put_i16_le(self.chan2_scaled);
26057        __tmp.put_i16_le(self.chan3_scaled);
26058        __tmp.put_i16_le(self.chan4_scaled);
26059        __tmp.put_i16_le(self.chan5_scaled);
26060        __tmp.put_i16_le(self.chan6_scaled);
26061        __tmp.put_i16_le(self.chan7_scaled);
26062        __tmp.put_i16_le(self.chan8_scaled);
26063        __tmp.put_u8(self.port);
26064        __tmp.put_u8(self.rssi);
26065        if matches!(version, MavlinkVersion::V2) {
26066            let len = __tmp.len();
26067            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26068        } else {
26069            __tmp.len()
26070        }
26071    }
26072}
26073#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
26074#[doc = "Request a data stream."]
26075#[doc = ""]
26076#[doc = "ID: 66"]
26077#[derive(Debug, Clone, PartialEq)]
26078#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26079#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26080#[cfg_attr(feature = "ts", derive(TS))]
26081#[cfg_attr(feature = "ts", ts(export))]
26082pub struct REQUEST_DATA_STREAM_DATA {
26083    #[doc = "The requested message rate"]
26084    pub req_message_rate: u16,
26085    #[doc = "The target requested to send the message stream."]
26086    pub target_system: u8,
26087    #[doc = "The target requested to send the message stream."]
26088    pub target_component: u8,
26089    #[doc = "The ID of the requested data stream"]
26090    pub req_stream_id: u8,
26091    #[doc = "1 to start sending, 0 to stop sending."]
26092    pub start_stop: u8,
26093}
26094impl REQUEST_DATA_STREAM_DATA {
26095    pub const ENCODED_LEN: usize = 6usize;
26096    pub const DEFAULT: Self = Self {
26097        req_message_rate: 0_u16,
26098        target_system: 0_u8,
26099        target_component: 0_u8,
26100        req_stream_id: 0_u8,
26101        start_stop: 0_u8,
26102    };
26103    #[cfg(feature = "arbitrary")]
26104    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26105        use arbitrary::{Arbitrary, Unstructured};
26106        let mut buf = [0u8; 1024];
26107        rng.fill_bytes(&mut buf);
26108        let mut unstructured = Unstructured::new(&buf);
26109        Self::arbitrary(&mut unstructured).unwrap_or_default()
26110    }
26111}
26112impl Default for REQUEST_DATA_STREAM_DATA {
26113    fn default() -> Self {
26114        Self::DEFAULT.clone()
26115    }
26116}
26117impl MessageData for REQUEST_DATA_STREAM_DATA {
26118    type Message = MavMessage;
26119    const ID: u32 = 66u32;
26120    const NAME: &'static str = "REQUEST_DATA_STREAM";
26121    const EXTRA_CRC: u8 = 148u8;
26122    const ENCODED_LEN: usize = 6usize;
26123    fn deser(
26124        _version: MavlinkVersion,
26125        __input: &[u8],
26126    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26127        let avail_len = __input.len();
26128        let mut payload_buf = [0; Self::ENCODED_LEN];
26129        let mut buf = if avail_len < Self::ENCODED_LEN {
26130            payload_buf[0..avail_len].copy_from_slice(__input);
26131            Bytes::new(&payload_buf)
26132        } else {
26133            Bytes::new(__input)
26134        };
26135        let mut __struct = Self::default();
26136        __struct.req_message_rate = buf.get_u16_le();
26137        __struct.target_system = buf.get_u8();
26138        __struct.target_component = buf.get_u8();
26139        __struct.req_stream_id = buf.get_u8();
26140        __struct.start_stop = buf.get_u8();
26141        Ok(__struct)
26142    }
26143    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26144        let mut __tmp = BytesMut::new(bytes);
26145        #[allow(clippy::absurd_extreme_comparisons)]
26146        #[allow(unused_comparisons)]
26147        if __tmp.remaining() < Self::ENCODED_LEN {
26148            panic!(
26149                "buffer is too small (need {} bytes, but got {})",
26150                Self::ENCODED_LEN,
26151                __tmp.remaining(),
26152            )
26153        }
26154        __tmp.put_u16_le(self.req_message_rate);
26155        __tmp.put_u8(self.target_system);
26156        __tmp.put_u8(self.target_component);
26157        __tmp.put_u8(self.req_stream_id);
26158        __tmp.put_u8(self.start_stop);
26159        if matches!(version, MavlinkVersion::V2) {
26160            let len = __tmp.len();
26161            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26162        } else {
26163            __tmp.len()
26164        }
26165    }
26166}
26167#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
26168#[doc = ""]
26169#[doc = "ID: 412"]
26170#[derive(Debug, Clone, PartialEq)]
26171#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26172#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26173#[cfg_attr(feature = "ts", derive(TS))]
26174#[cfg_attr(feature = "ts", ts(export))]
26175pub struct REQUEST_EVENT_DATA {
26176    #[doc = "First sequence number of the requested event."]
26177    pub first_sequence: u16,
26178    #[doc = "Last sequence number of the requested event."]
26179    pub last_sequence: u16,
26180    #[doc = "System ID"]
26181    pub target_system: u8,
26182    #[doc = "Component ID"]
26183    pub target_component: u8,
26184}
26185impl REQUEST_EVENT_DATA {
26186    pub const ENCODED_LEN: usize = 6usize;
26187    pub const DEFAULT: Self = Self {
26188        first_sequence: 0_u16,
26189        last_sequence: 0_u16,
26190        target_system: 0_u8,
26191        target_component: 0_u8,
26192    };
26193    #[cfg(feature = "arbitrary")]
26194    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26195        use arbitrary::{Arbitrary, Unstructured};
26196        let mut buf = [0u8; 1024];
26197        rng.fill_bytes(&mut buf);
26198        let mut unstructured = Unstructured::new(&buf);
26199        Self::arbitrary(&mut unstructured).unwrap_or_default()
26200    }
26201}
26202impl Default for REQUEST_EVENT_DATA {
26203    fn default() -> Self {
26204        Self::DEFAULT.clone()
26205    }
26206}
26207impl MessageData for REQUEST_EVENT_DATA {
26208    type Message = MavMessage;
26209    const ID: u32 = 412u32;
26210    const NAME: &'static str = "REQUEST_EVENT";
26211    const EXTRA_CRC: u8 = 33u8;
26212    const ENCODED_LEN: usize = 6usize;
26213    fn deser(
26214        _version: MavlinkVersion,
26215        __input: &[u8],
26216    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26217        let avail_len = __input.len();
26218        let mut payload_buf = [0; Self::ENCODED_LEN];
26219        let mut buf = if avail_len < Self::ENCODED_LEN {
26220            payload_buf[0..avail_len].copy_from_slice(__input);
26221            Bytes::new(&payload_buf)
26222        } else {
26223            Bytes::new(__input)
26224        };
26225        let mut __struct = Self::default();
26226        __struct.first_sequence = buf.get_u16_le();
26227        __struct.last_sequence = buf.get_u16_le();
26228        __struct.target_system = buf.get_u8();
26229        __struct.target_component = buf.get_u8();
26230        Ok(__struct)
26231    }
26232    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26233        let mut __tmp = BytesMut::new(bytes);
26234        #[allow(clippy::absurd_extreme_comparisons)]
26235        #[allow(unused_comparisons)]
26236        if __tmp.remaining() < Self::ENCODED_LEN {
26237            panic!(
26238                "buffer is too small (need {} bytes, but got {})",
26239                Self::ENCODED_LEN,
26240                __tmp.remaining(),
26241            )
26242        }
26243        __tmp.put_u16_le(self.first_sequence);
26244        __tmp.put_u16_le(self.last_sequence);
26245        __tmp.put_u8(self.target_system);
26246        __tmp.put_u8(self.target_component);
26247        if matches!(version, MavlinkVersion::V2) {
26248            let len = __tmp.len();
26249            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26250        } else {
26251            __tmp.len()
26252        }
26253    }
26254}
26255#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
26256#[doc = ""]
26257#[doc = "ID: 142"]
26258#[derive(Debug, Clone, PartialEq)]
26259#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26260#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26261#[cfg_attr(feature = "ts", derive(TS))]
26262#[cfg_attr(feature = "ts", ts(export))]
26263pub struct RESOURCE_REQUEST_DATA {
26264    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
26265    pub request_id: u8,
26266    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
26267    pub uri_type: u8,
26268    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
26269    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26270    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26271    pub uri: [u8; 120],
26272    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
26273    pub transfer_type: u8,
26274    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
26275    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26276    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26277    pub storage: [u8; 120],
26278}
26279impl RESOURCE_REQUEST_DATA {
26280    pub const ENCODED_LEN: usize = 243usize;
26281    pub const DEFAULT: Self = Self {
26282        request_id: 0_u8,
26283        uri_type: 0_u8,
26284        uri: [0_u8; 120usize],
26285        transfer_type: 0_u8,
26286        storage: [0_u8; 120usize],
26287    };
26288    #[cfg(feature = "arbitrary")]
26289    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26290        use arbitrary::{Arbitrary, Unstructured};
26291        let mut buf = [0u8; 1024];
26292        rng.fill_bytes(&mut buf);
26293        let mut unstructured = Unstructured::new(&buf);
26294        Self::arbitrary(&mut unstructured).unwrap_or_default()
26295    }
26296}
26297impl Default for RESOURCE_REQUEST_DATA {
26298    fn default() -> Self {
26299        Self::DEFAULT.clone()
26300    }
26301}
26302impl MessageData for RESOURCE_REQUEST_DATA {
26303    type Message = MavMessage;
26304    const ID: u32 = 142u32;
26305    const NAME: &'static str = "RESOURCE_REQUEST";
26306    const EXTRA_CRC: u8 = 72u8;
26307    const ENCODED_LEN: usize = 243usize;
26308    fn deser(
26309        _version: MavlinkVersion,
26310        __input: &[u8],
26311    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26312        let avail_len = __input.len();
26313        let mut payload_buf = [0; Self::ENCODED_LEN];
26314        let mut buf = if avail_len < Self::ENCODED_LEN {
26315            payload_buf[0..avail_len].copy_from_slice(__input);
26316            Bytes::new(&payload_buf)
26317        } else {
26318            Bytes::new(__input)
26319        };
26320        let mut __struct = Self::default();
26321        __struct.request_id = buf.get_u8();
26322        __struct.uri_type = buf.get_u8();
26323        for v in &mut __struct.uri {
26324            let val = buf.get_u8();
26325            *v = val;
26326        }
26327        __struct.transfer_type = buf.get_u8();
26328        for v in &mut __struct.storage {
26329            let val = buf.get_u8();
26330            *v = val;
26331        }
26332        Ok(__struct)
26333    }
26334    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26335        let mut __tmp = BytesMut::new(bytes);
26336        #[allow(clippy::absurd_extreme_comparisons)]
26337        #[allow(unused_comparisons)]
26338        if __tmp.remaining() < Self::ENCODED_LEN {
26339            panic!(
26340                "buffer is too small (need {} bytes, but got {})",
26341                Self::ENCODED_LEN,
26342                __tmp.remaining(),
26343            )
26344        }
26345        __tmp.put_u8(self.request_id);
26346        __tmp.put_u8(self.uri_type);
26347        for val in &self.uri {
26348            __tmp.put_u8(*val);
26349        }
26350        __tmp.put_u8(self.transfer_type);
26351        for val in &self.storage {
26352            __tmp.put_u8(*val);
26353        }
26354        if matches!(version, MavlinkVersion::V2) {
26355            let len = __tmp.len();
26356            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26357        } else {
26358            __tmp.len()
26359        }
26360    }
26361}
26362#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
26363#[doc = ""]
26364#[doc = "ID: 413"]
26365#[derive(Debug, Clone, PartialEq)]
26366#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26368#[cfg_attr(feature = "ts", derive(TS))]
26369#[cfg_attr(feature = "ts", ts(export))]
26370pub struct RESPONSE_EVENT_ERROR_DATA {
26371    #[doc = "Sequence number."]
26372    pub sequence: u16,
26373    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
26374    pub sequence_oldest_available: u16,
26375    #[doc = "System ID"]
26376    pub target_system: u8,
26377    #[doc = "Component ID"]
26378    pub target_component: u8,
26379    #[doc = "Error reason."]
26380    pub reason: MavEventErrorReason,
26381}
26382impl RESPONSE_EVENT_ERROR_DATA {
26383    pub const ENCODED_LEN: usize = 7usize;
26384    pub const DEFAULT: Self = Self {
26385        sequence: 0_u16,
26386        sequence_oldest_available: 0_u16,
26387        target_system: 0_u8,
26388        target_component: 0_u8,
26389        reason: MavEventErrorReason::DEFAULT,
26390    };
26391    #[cfg(feature = "arbitrary")]
26392    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26393        use arbitrary::{Arbitrary, Unstructured};
26394        let mut buf = [0u8; 1024];
26395        rng.fill_bytes(&mut buf);
26396        let mut unstructured = Unstructured::new(&buf);
26397        Self::arbitrary(&mut unstructured).unwrap_or_default()
26398    }
26399}
26400impl Default for RESPONSE_EVENT_ERROR_DATA {
26401    fn default() -> Self {
26402        Self::DEFAULT.clone()
26403    }
26404}
26405impl MessageData for RESPONSE_EVENT_ERROR_DATA {
26406    type Message = MavMessage;
26407    const ID: u32 = 413u32;
26408    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
26409    const EXTRA_CRC: u8 = 77u8;
26410    const ENCODED_LEN: usize = 7usize;
26411    fn deser(
26412        _version: MavlinkVersion,
26413        __input: &[u8],
26414    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26415        let avail_len = __input.len();
26416        let mut payload_buf = [0; Self::ENCODED_LEN];
26417        let mut buf = if avail_len < Self::ENCODED_LEN {
26418            payload_buf[0..avail_len].copy_from_slice(__input);
26419            Bytes::new(&payload_buf)
26420        } else {
26421            Bytes::new(__input)
26422        };
26423        let mut __struct = Self::default();
26424        __struct.sequence = buf.get_u16_le();
26425        __struct.sequence_oldest_available = buf.get_u16_le();
26426        __struct.target_system = buf.get_u8();
26427        __struct.target_component = buf.get_u8();
26428        let tmp = buf.get_u8();
26429        __struct.reason =
26430            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26431                enum_type: "MavEventErrorReason",
26432                value: tmp as u32,
26433            })?;
26434        Ok(__struct)
26435    }
26436    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26437        let mut __tmp = BytesMut::new(bytes);
26438        #[allow(clippy::absurd_extreme_comparisons)]
26439        #[allow(unused_comparisons)]
26440        if __tmp.remaining() < Self::ENCODED_LEN {
26441            panic!(
26442                "buffer is too small (need {} bytes, but got {})",
26443                Self::ENCODED_LEN,
26444                __tmp.remaining(),
26445            )
26446        }
26447        __tmp.put_u16_le(self.sequence);
26448        __tmp.put_u16_le(self.sequence_oldest_available);
26449        __tmp.put_u8(self.target_system);
26450        __tmp.put_u8(self.target_component);
26451        __tmp.put_u8(self.reason as u8);
26452        if matches!(version, MavlinkVersion::V2) {
26453            let len = __tmp.len();
26454            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26455        } else {
26456            __tmp.len()
26457        }
26458    }
26459}
26460#[doc = "Read out the safety zone the MAV currently assumes."]
26461#[doc = ""]
26462#[doc = "ID: 55"]
26463#[derive(Debug, Clone, PartialEq)]
26464#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26465#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26466#[cfg_attr(feature = "ts", derive(TS))]
26467#[cfg_attr(feature = "ts", ts(export))]
26468pub struct SAFETY_ALLOWED_AREA_DATA {
26469    #[doc = "x position 1 / Latitude 1"]
26470    pub p1x: f32,
26471    #[doc = "y position 1 / Longitude 1"]
26472    pub p1y: f32,
26473    #[doc = "z position 1 / Altitude 1"]
26474    pub p1z: f32,
26475    #[doc = "x position 2 / Latitude 2"]
26476    pub p2x: f32,
26477    #[doc = "y position 2 / Longitude 2"]
26478    pub p2y: f32,
26479    #[doc = "z position 2 / Altitude 2"]
26480    pub p2z: f32,
26481    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26482    pub frame: MavFrame,
26483}
26484impl SAFETY_ALLOWED_AREA_DATA {
26485    pub const ENCODED_LEN: usize = 25usize;
26486    pub const DEFAULT: Self = Self {
26487        p1x: 0.0_f32,
26488        p1y: 0.0_f32,
26489        p1z: 0.0_f32,
26490        p2x: 0.0_f32,
26491        p2y: 0.0_f32,
26492        p2z: 0.0_f32,
26493        frame: MavFrame::DEFAULT,
26494    };
26495    #[cfg(feature = "arbitrary")]
26496    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26497        use arbitrary::{Arbitrary, Unstructured};
26498        let mut buf = [0u8; 1024];
26499        rng.fill_bytes(&mut buf);
26500        let mut unstructured = Unstructured::new(&buf);
26501        Self::arbitrary(&mut unstructured).unwrap_or_default()
26502    }
26503}
26504impl Default for SAFETY_ALLOWED_AREA_DATA {
26505    fn default() -> Self {
26506        Self::DEFAULT.clone()
26507    }
26508}
26509impl MessageData for SAFETY_ALLOWED_AREA_DATA {
26510    type Message = MavMessage;
26511    const ID: u32 = 55u32;
26512    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
26513    const EXTRA_CRC: u8 = 3u8;
26514    const ENCODED_LEN: usize = 25usize;
26515    fn deser(
26516        _version: MavlinkVersion,
26517        __input: &[u8],
26518    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26519        let avail_len = __input.len();
26520        let mut payload_buf = [0; Self::ENCODED_LEN];
26521        let mut buf = if avail_len < Self::ENCODED_LEN {
26522            payload_buf[0..avail_len].copy_from_slice(__input);
26523            Bytes::new(&payload_buf)
26524        } else {
26525            Bytes::new(__input)
26526        };
26527        let mut __struct = Self::default();
26528        __struct.p1x = buf.get_f32_le();
26529        __struct.p1y = buf.get_f32_le();
26530        __struct.p1z = buf.get_f32_le();
26531        __struct.p2x = buf.get_f32_le();
26532        __struct.p2y = buf.get_f32_le();
26533        __struct.p2z = buf.get_f32_le();
26534        let tmp = buf.get_u8();
26535        __struct.frame =
26536            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26537                enum_type: "MavFrame",
26538                value: tmp as u32,
26539            })?;
26540        Ok(__struct)
26541    }
26542    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26543        let mut __tmp = BytesMut::new(bytes);
26544        #[allow(clippy::absurd_extreme_comparisons)]
26545        #[allow(unused_comparisons)]
26546        if __tmp.remaining() < Self::ENCODED_LEN {
26547            panic!(
26548                "buffer is too small (need {} bytes, but got {})",
26549                Self::ENCODED_LEN,
26550                __tmp.remaining(),
26551            )
26552        }
26553        __tmp.put_f32_le(self.p1x);
26554        __tmp.put_f32_le(self.p1y);
26555        __tmp.put_f32_le(self.p1z);
26556        __tmp.put_f32_le(self.p2x);
26557        __tmp.put_f32_le(self.p2y);
26558        __tmp.put_f32_le(self.p2z);
26559        __tmp.put_u8(self.frame as u8);
26560        if matches!(version, MavlinkVersion::V2) {
26561            let len = __tmp.len();
26562            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26563        } else {
26564            __tmp.len()
26565        }
26566    }
26567}
26568#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
26569#[doc = ""]
26570#[doc = "ID: 54"]
26571#[derive(Debug, Clone, PartialEq)]
26572#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26573#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26574#[cfg_attr(feature = "ts", derive(TS))]
26575#[cfg_attr(feature = "ts", ts(export))]
26576pub struct SAFETY_SET_ALLOWED_AREA_DATA {
26577    #[doc = "x position 1 / Latitude 1"]
26578    pub p1x: f32,
26579    #[doc = "y position 1 / Longitude 1"]
26580    pub p1y: f32,
26581    #[doc = "z position 1 / Altitude 1"]
26582    pub p1z: f32,
26583    #[doc = "x position 2 / Latitude 2"]
26584    pub p2x: f32,
26585    #[doc = "y position 2 / Longitude 2"]
26586    pub p2y: f32,
26587    #[doc = "z position 2 / Altitude 2"]
26588    pub p2z: f32,
26589    #[doc = "System ID"]
26590    pub target_system: u8,
26591    #[doc = "Component ID"]
26592    pub target_component: u8,
26593    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26594    pub frame: MavFrame,
26595}
26596impl SAFETY_SET_ALLOWED_AREA_DATA {
26597    pub const ENCODED_LEN: usize = 27usize;
26598    pub const DEFAULT: Self = Self {
26599        p1x: 0.0_f32,
26600        p1y: 0.0_f32,
26601        p1z: 0.0_f32,
26602        p2x: 0.0_f32,
26603        p2y: 0.0_f32,
26604        p2z: 0.0_f32,
26605        target_system: 0_u8,
26606        target_component: 0_u8,
26607        frame: MavFrame::DEFAULT,
26608    };
26609    #[cfg(feature = "arbitrary")]
26610    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26611        use arbitrary::{Arbitrary, Unstructured};
26612        let mut buf = [0u8; 1024];
26613        rng.fill_bytes(&mut buf);
26614        let mut unstructured = Unstructured::new(&buf);
26615        Self::arbitrary(&mut unstructured).unwrap_or_default()
26616    }
26617}
26618impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
26619    fn default() -> Self {
26620        Self::DEFAULT.clone()
26621    }
26622}
26623impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
26624    type Message = MavMessage;
26625    const ID: u32 = 54u32;
26626    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
26627    const EXTRA_CRC: u8 = 15u8;
26628    const ENCODED_LEN: usize = 27usize;
26629    fn deser(
26630        _version: MavlinkVersion,
26631        __input: &[u8],
26632    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26633        let avail_len = __input.len();
26634        let mut payload_buf = [0; Self::ENCODED_LEN];
26635        let mut buf = if avail_len < Self::ENCODED_LEN {
26636            payload_buf[0..avail_len].copy_from_slice(__input);
26637            Bytes::new(&payload_buf)
26638        } else {
26639            Bytes::new(__input)
26640        };
26641        let mut __struct = Self::default();
26642        __struct.p1x = buf.get_f32_le();
26643        __struct.p1y = buf.get_f32_le();
26644        __struct.p1z = buf.get_f32_le();
26645        __struct.p2x = buf.get_f32_le();
26646        __struct.p2y = buf.get_f32_le();
26647        __struct.p2z = buf.get_f32_le();
26648        __struct.target_system = buf.get_u8();
26649        __struct.target_component = buf.get_u8();
26650        let tmp = buf.get_u8();
26651        __struct.frame =
26652            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26653                enum_type: "MavFrame",
26654                value: tmp as u32,
26655            })?;
26656        Ok(__struct)
26657    }
26658    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26659        let mut __tmp = BytesMut::new(bytes);
26660        #[allow(clippy::absurd_extreme_comparisons)]
26661        #[allow(unused_comparisons)]
26662        if __tmp.remaining() < Self::ENCODED_LEN {
26663            panic!(
26664                "buffer is too small (need {} bytes, but got {})",
26665                Self::ENCODED_LEN,
26666                __tmp.remaining(),
26667            )
26668        }
26669        __tmp.put_f32_le(self.p1x);
26670        __tmp.put_f32_le(self.p1y);
26671        __tmp.put_f32_le(self.p1z);
26672        __tmp.put_f32_le(self.p2x);
26673        __tmp.put_f32_le(self.p2y);
26674        __tmp.put_f32_le(self.p2z);
26675        __tmp.put_u8(self.target_system);
26676        __tmp.put_u8(self.target_component);
26677        __tmp.put_u8(self.frame as u8);
26678        if matches!(version, MavlinkVersion::V2) {
26679            let len = __tmp.len();
26680            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26681        } else {
26682            __tmp.len()
26683        }
26684    }
26685}
26686#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
26687#[doc = ""]
26688#[doc = "ID: 26"]
26689#[derive(Debug, Clone, PartialEq)]
26690#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26691#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26692#[cfg_attr(feature = "ts", derive(TS))]
26693#[cfg_attr(feature = "ts", ts(export))]
26694pub struct SCALED_IMU_DATA {
26695    #[doc = "Timestamp (time since system boot)."]
26696    pub time_boot_ms: u32,
26697    #[doc = "X acceleration"]
26698    pub xacc: i16,
26699    #[doc = "Y acceleration"]
26700    pub yacc: i16,
26701    #[doc = "Z acceleration"]
26702    pub zacc: i16,
26703    #[doc = "Angular speed around X axis"]
26704    pub xgyro: i16,
26705    #[doc = "Angular speed around Y axis"]
26706    pub ygyro: i16,
26707    #[doc = "Angular speed around Z axis"]
26708    pub zgyro: i16,
26709    #[doc = "X Magnetic field"]
26710    pub xmag: i16,
26711    #[doc = "Y Magnetic field"]
26712    pub ymag: i16,
26713    #[doc = "Z Magnetic field"]
26714    pub zmag: i16,
26715    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26716    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26717    pub temperature: i16,
26718}
26719impl SCALED_IMU_DATA {
26720    pub const ENCODED_LEN: usize = 24usize;
26721    pub const DEFAULT: Self = Self {
26722        time_boot_ms: 0_u32,
26723        xacc: 0_i16,
26724        yacc: 0_i16,
26725        zacc: 0_i16,
26726        xgyro: 0_i16,
26727        ygyro: 0_i16,
26728        zgyro: 0_i16,
26729        xmag: 0_i16,
26730        ymag: 0_i16,
26731        zmag: 0_i16,
26732        temperature: 0_i16,
26733    };
26734    #[cfg(feature = "arbitrary")]
26735    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26736        use arbitrary::{Arbitrary, Unstructured};
26737        let mut buf = [0u8; 1024];
26738        rng.fill_bytes(&mut buf);
26739        let mut unstructured = Unstructured::new(&buf);
26740        Self::arbitrary(&mut unstructured).unwrap_or_default()
26741    }
26742}
26743impl Default for SCALED_IMU_DATA {
26744    fn default() -> Self {
26745        Self::DEFAULT.clone()
26746    }
26747}
26748impl MessageData for SCALED_IMU_DATA {
26749    type Message = MavMessage;
26750    const ID: u32 = 26u32;
26751    const NAME: &'static str = "SCALED_IMU";
26752    const EXTRA_CRC: u8 = 170u8;
26753    const ENCODED_LEN: usize = 24usize;
26754    fn deser(
26755        _version: MavlinkVersion,
26756        __input: &[u8],
26757    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26758        let avail_len = __input.len();
26759        let mut payload_buf = [0; Self::ENCODED_LEN];
26760        let mut buf = if avail_len < Self::ENCODED_LEN {
26761            payload_buf[0..avail_len].copy_from_slice(__input);
26762            Bytes::new(&payload_buf)
26763        } else {
26764            Bytes::new(__input)
26765        };
26766        let mut __struct = Self::default();
26767        __struct.time_boot_ms = buf.get_u32_le();
26768        __struct.xacc = buf.get_i16_le();
26769        __struct.yacc = buf.get_i16_le();
26770        __struct.zacc = buf.get_i16_le();
26771        __struct.xgyro = buf.get_i16_le();
26772        __struct.ygyro = buf.get_i16_le();
26773        __struct.zgyro = buf.get_i16_le();
26774        __struct.xmag = buf.get_i16_le();
26775        __struct.ymag = buf.get_i16_le();
26776        __struct.zmag = buf.get_i16_le();
26777        __struct.temperature = buf.get_i16_le();
26778        Ok(__struct)
26779    }
26780    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26781        let mut __tmp = BytesMut::new(bytes);
26782        #[allow(clippy::absurd_extreme_comparisons)]
26783        #[allow(unused_comparisons)]
26784        if __tmp.remaining() < Self::ENCODED_LEN {
26785            panic!(
26786                "buffer is too small (need {} bytes, but got {})",
26787                Self::ENCODED_LEN,
26788                __tmp.remaining(),
26789            )
26790        }
26791        __tmp.put_u32_le(self.time_boot_ms);
26792        __tmp.put_i16_le(self.xacc);
26793        __tmp.put_i16_le(self.yacc);
26794        __tmp.put_i16_le(self.zacc);
26795        __tmp.put_i16_le(self.xgyro);
26796        __tmp.put_i16_le(self.ygyro);
26797        __tmp.put_i16_le(self.zgyro);
26798        __tmp.put_i16_le(self.xmag);
26799        __tmp.put_i16_le(self.ymag);
26800        __tmp.put_i16_le(self.zmag);
26801        if matches!(version, MavlinkVersion::V2) {
26802            __tmp.put_i16_le(self.temperature);
26803            let len = __tmp.len();
26804            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26805        } else {
26806            __tmp.len()
26807        }
26808    }
26809}
26810#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
26811#[doc = ""]
26812#[doc = "ID: 116"]
26813#[derive(Debug, Clone, PartialEq)]
26814#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26815#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26816#[cfg_attr(feature = "ts", derive(TS))]
26817#[cfg_attr(feature = "ts", ts(export))]
26818pub struct SCALED_IMU2_DATA {
26819    #[doc = "Timestamp (time since system boot)."]
26820    pub time_boot_ms: u32,
26821    #[doc = "X acceleration"]
26822    pub xacc: i16,
26823    #[doc = "Y acceleration"]
26824    pub yacc: i16,
26825    #[doc = "Z acceleration"]
26826    pub zacc: i16,
26827    #[doc = "Angular speed around X axis"]
26828    pub xgyro: i16,
26829    #[doc = "Angular speed around Y axis"]
26830    pub ygyro: i16,
26831    #[doc = "Angular speed around Z axis"]
26832    pub zgyro: i16,
26833    #[doc = "X Magnetic field"]
26834    pub xmag: i16,
26835    #[doc = "Y Magnetic field"]
26836    pub ymag: i16,
26837    #[doc = "Z Magnetic field"]
26838    pub zmag: i16,
26839    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26840    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26841    pub temperature: i16,
26842}
26843impl SCALED_IMU2_DATA {
26844    pub const ENCODED_LEN: usize = 24usize;
26845    pub const DEFAULT: Self = Self {
26846        time_boot_ms: 0_u32,
26847        xacc: 0_i16,
26848        yacc: 0_i16,
26849        zacc: 0_i16,
26850        xgyro: 0_i16,
26851        ygyro: 0_i16,
26852        zgyro: 0_i16,
26853        xmag: 0_i16,
26854        ymag: 0_i16,
26855        zmag: 0_i16,
26856        temperature: 0_i16,
26857    };
26858    #[cfg(feature = "arbitrary")]
26859    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26860        use arbitrary::{Arbitrary, Unstructured};
26861        let mut buf = [0u8; 1024];
26862        rng.fill_bytes(&mut buf);
26863        let mut unstructured = Unstructured::new(&buf);
26864        Self::arbitrary(&mut unstructured).unwrap_or_default()
26865    }
26866}
26867impl Default for SCALED_IMU2_DATA {
26868    fn default() -> Self {
26869        Self::DEFAULT.clone()
26870    }
26871}
26872impl MessageData for SCALED_IMU2_DATA {
26873    type Message = MavMessage;
26874    const ID: u32 = 116u32;
26875    const NAME: &'static str = "SCALED_IMU2";
26876    const EXTRA_CRC: u8 = 76u8;
26877    const ENCODED_LEN: usize = 24usize;
26878    fn deser(
26879        _version: MavlinkVersion,
26880        __input: &[u8],
26881    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26882        let avail_len = __input.len();
26883        let mut payload_buf = [0; Self::ENCODED_LEN];
26884        let mut buf = if avail_len < Self::ENCODED_LEN {
26885            payload_buf[0..avail_len].copy_from_slice(__input);
26886            Bytes::new(&payload_buf)
26887        } else {
26888            Bytes::new(__input)
26889        };
26890        let mut __struct = Self::default();
26891        __struct.time_boot_ms = buf.get_u32_le();
26892        __struct.xacc = buf.get_i16_le();
26893        __struct.yacc = buf.get_i16_le();
26894        __struct.zacc = buf.get_i16_le();
26895        __struct.xgyro = buf.get_i16_le();
26896        __struct.ygyro = buf.get_i16_le();
26897        __struct.zgyro = buf.get_i16_le();
26898        __struct.xmag = buf.get_i16_le();
26899        __struct.ymag = buf.get_i16_le();
26900        __struct.zmag = buf.get_i16_le();
26901        __struct.temperature = buf.get_i16_le();
26902        Ok(__struct)
26903    }
26904    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26905        let mut __tmp = BytesMut::new(bytes);
26906        #[allow(clippy::absurd_extreme_comparisons)]
26907        #[allow(unused_comparisons)]
26908        if __tmp.remaining() < Self::ENCODED_LEN {
26909            panic!(
26910                "buffer is too small (need {} bytes, but got {})",
26911                Self::ENCODED_LEN,
26912                __tmp.remaining(),
26913            )
26914        }
26915        __tmp.put_u32_le(self.time_boot_ms);
26916        __tmp.put_i16_le(self.xacc);
26917        __tmp.put_i16_le(self.yacc);
26918        __tmp.put_i16_le(self.zacc);
26919        __tmp.put_i16_le(self.xgyro);
26920        __tmp.put_i16_le(self.ygyro);
26921        __tmp.put_i16_le(self.zgyro);
26922        __tmp.put_i16_le(self.xmag);
26923        __tmp.put_i16_le(self.ymag);
26924        __tmp.put_i16_le(self.zmag);
26925        if matches!(version, MavlinkVersion::V2) {
26926            __tmp.put_i16_le(self.temperature);
26927            let len = __tmp.len();
26928            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26929        } else {
26930            __tmp.len()
26931        }
26932    }
26933}
26934#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
26935#[doc = ""]
26936#[doc = "ID: 129"]
26937#[derive(Debug, Clone, PartialEq)]
26938#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26939#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26940#[cfg_attr(feature = "ts", derive(TS))]
26941#[cfg_attr(feature = "ts", ts(export))]
26942pub struct SCALED_IMU3_DATA {
26943    #[doc = "Timestamp (time since system boot)."]
26944    pub time_boot_ms: u32,
26945    #[doc = "X acceleration"]
26946    pub xacc: i16,
26947    #[doc = "Y acceleration"]
26948    pub yacc: i16,
26949    #[doc = "Z acceleration"]
26950    pub zacc: i16,
26951    #[doc = "Angular speed around X axis"]
26952    pub xgyro: i16,
26953    #[doc = "Angular speed around Y axis"]
26954    pub ygyro: i16,
26955    #[doc = "Angular speed around Z axis"]
26956    pub zgyro: i16,
26957    #[doc = "X Magnetic field"]
26958    pub xmag: i16,
26959    #[doc = "Y Magnetic field"]
26960    pub ymag: i16,
26961    #[doc = "Z Magnetic field"]
26962    pub zmag: i16,
26963    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26964    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26965    pub temperature: i16,
26966}
26967impl SCALED_IMU3_DATA {
26968    pub const ENCODED_LEN: usize = 24usize;
26969    pub const DEFAULT: Self = Self {
26970        time_boot_ms: 0_u32,
26971        xacc: 0_i16,
26972        yacc: 0_i16,
26973        zacc: 0_i16,
26974        xgyro: 0_i16,
26975        ygyro: 0_i16,
26976        zgyro: 0_i16,
26977        xmag: 0_i16,
26978        ymag: 0_i16,
26979        zmag: 0_i16,
26980        temperature: 0_i16,
26981    };
26982    #[cfg(feature = "arbitrary")]
26983    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26984        use arbitrary::{Arbitrary, Unstructured};
26985        let mut buf = [0u8; 1024];
26986        rng.fill_bytes(&mut buf);
26987        let mut unstructured = Unstructured::new(&buf);
26988        Self::arbitrary(&mut unstructured).unwrap_or_default()
26989    }
26990}
26991impl Default for SCALED_IMU3_DATA {
26992    fn default() -> Self {
26993        Self::DEFAULT.clone()
26994    }
26995}
26996impl MessageData for SCALED_IMU3_DATA {
26997    type Message = MavMessage;
26998    const ID: u32 = 129u32;
26999    const NAME: &'static str = "SCALED_IMU3";
27000    const EXTRA_CRC: u8 = 46u8;
27001    const ENCODED_LEN: usize = 24usize;
27002    fn deser(
27003        _version: MavlinkVersion,
27004        __input: &[u8],
27005    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27006        let avail_len = __input.len();
27007        let mut payload_buf = [0; Self::ENCODED_LEN];
27008        let mut buf = if avail_len < Self::ENCODED_LEN {
27009            payload_buf[0..avail_len].copy_from_slice(__input);
27010            Bytes::new(&payload_buf)
27011        } else {
27012            Bytes::new(__input)
27013        };
27014        let mut __struct = Self::default();
27015        __struct.time_boot_ms = buf.get_u32_le();
27016        __struct.xacc = buf.get_i16_le();
27017        __struct.yacc = buf.get_i16_le();
27018        __struct.zacc = buf.get_i16_le();
27019        __struct.xgyro = buf.get_i16_le();
27020        __struct.ygyro = buf.get_i16_le();
27021        __struct.zgyro = buf.get_i16_le();
27022        __struct.xmag = buf.get_i16_le();
27023        __struct.ymag = buf.get_i16_le();
27024        __struct.zmag = buf.get_i16_le();
27025        __struct.temperature = buf.get_i16_le();
27026        Ok(__struct)
27027    }
27028    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27029        let mut __tmp = BytesMut::new(bytes);
27030        #[allow(clippy::absurd_extreme_comparisons)]
27031        #[allow(unused_comparisons)]
27032        if __tmp.remaining() < Self::ENCODED_LEN {
27033            panic!(
27034                "buffer is too small (need {} bytes, but got {})",
27035                Self::ENCODED_LEN,
27036                __tmp.remaining(),
27037            )
27038        }
27039        __tmp.put_u32_le(self.time_boot_ms);
27040        __tmp.put_i16_le(self.xacc);
27041        __tmp.put_i16_le(self.yacc);
27042        __tmp.put_i16_le(self.zacc);
27043        __tmp.put_i16_le(self.xgyro);
27044        __tmp.put_i16_le(self.ygyro);
27045        __tmp.put_i16_le(self.zgyro);
27046        __tmp.put_i16_le(self.xmag);
27047        __tmp.put_i16_le(self.ymag);
27048        __tmp.put_i16_le(self.zmag);
27049        if matches!(version, MavlinkVersion::V2) {
27050            __tmp.put_i16_le(self.temperature);
27051            let len = __tmp.len();
27052            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27053        } else {
27054            __tmp.len()
27055        }
27056    }
27057}
27058#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
27059#[doc = ""]
27060#[doc = "ID: 29"]
27061#[derive(Debug, Clone, PartialEq)]
27062#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27063#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27064#[cfg_attr(feature = "ts", derive(TS))]
27065#[cfg_attr(feature = "ts", ts(export))]
27066pub struct SCALED_PRESSURE_DATA {
27067    #[doc = "Timestamp (time since system boot)."]
27068    pub time_boot_ms: u32,
27069    #[doc = "Absolute pressure"]
27070    pub press_abs: f32,
27071    #[doc = "Differential pressure 1"]
27072    pub press_diff: f32,
27073    #[doc = "Absolute pressure temperature"]
27074    pub temperature: i16,
27075    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27076    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27077    pub temperature_press_diff: i16,
27078}
27079impl SCALED_PRESSURE_DATA {
27080    pub const ENCODED_LEN: usize = 16usize;
27081    pub const DEFAULT: Self = Self {
27082        time_boot_ms: 0_u32,
27083        press_abs: 0.0_f32,
27084        press_diff: 0.0_f32,
27085        temperature: 0_i16,
27086        temperature_press_diff: 0_i16,
27087    };
27088    #[cfg(feature = "arbitrary")]
27089    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27090        use arbitrary::{Arbitrary, Unstructured};
27091        let mut buf = [0u8; 1024];
27092        rng.fill_bytes(&mut buf);
27093        let mut unstructured = Unstructured::new(&buf);
27094        Self::arbitrary(&mut unstructured).unwrap_or_default()
27095    }
27096}
27097impl Default for SCALED_PRESSURE_DATA {
27098    fn default() -> Self {
27099        Self::DEFAULT.clone()
27100    }
27101}
27102impl MessageData for SCALED_PRESSURE_DATA {
27103    type Message = MavMessage;
27104    const ID: u32 = 29u32;
27105    const NAME: &'static str = "SCALED_PRESSURE";
27106    const EXTRA_CRC: u8 = 115u8;
27107    const ENCODED_LEN: usize = 16usize;
27108    fn deser(
27109        _version: MavlinkVersion,
27110        __input: &[u8],
27111    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27112        let avail_len = __input.len();
27113        let mut payload_buf = [0; Self::ENCODED_LEN];
27114        let mut buf = if avail_len < Self::ENCODED_LEN {
27115            payload_buf[0..avail_len].copy_from_slice(__input);
27116            Bytes::new(&payload_buf)
27117        } else {
27118            Bytes::new(__input)
27119        };
27120        let mut __struct = Self::default();
27121        __struct.time_boot_ms = buf.get_u32_le();
27122        __struct.press_abs = buf.get_f32_le();
27123        __struct.press_diff = buf.get_f32_le();
27124        __struct.temperature = buf.get_i16_le();
27125        __struct.temperature_press_diff = buf.get_i16_le();
27126        Ok(__struct)
27127    }
27128    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27129        let mut __tmp = BytesMut::new(bytes);
27130        #[allow(clippy::absurd_extreme_comparisons)]
27131        #[allow(unused_comparisons)]
27132        if __tmp.remaining() < Self::ENCODED_LEN {
27133            panic!(
27134                "buffer is too small (need {} bytes, but got {})",
27135                Self::ENCODED_LEN,
27136                __tmp.remaining(),
27137            )
27138        }
27139        __tmp.put_u32_le(self.time_boot_ms);
27140        __tmp.put_f32_le(self.press_abs);
27141        __tmp.put_f32_le(self.press_diff);
27142        __tmp.put_i16_le(self.temperature);
27143        if matches!(version, MavlinkVersion::V2) {
27144            __tmp.put_i16_le(self.temperature_press_diff);
27145            let len = __tmp.len();
27146            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27147        } else {
27148            __tmp.len()
27149        }
27150    }
27151}
27152#[doc = "Barometer readings for 2nd barometer."]
27153#[doc = ""]
27154#[doc = "ID: 137"]
27155#[derive(Debug, Clone, PartialEq)]
27156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27158#[cfg_attr(feature = "ts", derive(TS))]
27159#[cfg_attr(feature = "ts", ts(export))]
27160pub struct SCALED_PRESSURE2_DATA {
27161    #[doc = "Timestamp (time since system boot)."]
27162    pub time_boot_ms: u32,
27163    #[doc = "Absolute pressure"]
27164    pub press_abs: f32,
27165    #[doc = "Differential pressure"]
27166    pub press_diff: f32,
27167    #[doc = "Absolute pressure temperature"]
27168    pub temperature: i16,
27169    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27170    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27171    pub temperature_press_diff: i16,
27172}
27173impl SCALED_PRESSURE2_DATA {
27174    pub const ENCODED_LEN: usize = 16usize;
27175    pub const DEFAULT: Self = Self {
27176        time_boot_ms: 0_u32,
27177        press_abs: 0.0_f32,
27178        press_diff: 0.0_f32,
27179        temperature: 0_i16,
27180        temperature_press_diff: 0_i16,
27181    };
27182    #[cfg(feature = "arbitrary")]
27183    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27184        use arbitrary::{Arbitrary, Unstructured};
27185        let mut buf = [0u8; 1024];
27186        rng.fill_bytes(&mut buf);
27187        let mut unstructured = Unstructured::new(&buf);
27188        Self::arbitrary(&mut unstructured).unwrap_or_default()
27189    }
27190}
27191impl Default for SCALED_PRESSURE2_DATA {
27192    fn default() -> Self {
27193        Self::DEFAULT.clone()
27194    }
27195}
27196impl MessageData for SCALED_PRESSURE2_DATA {
27197    type Message = MavMessage;
27198    const ID: u32 = 137u32;
27199    const NAME: &'static str = "SCALED_PRESSURE2";
27200    const EXTRA_CRC: u8 = 195u8;
27201    const ENCODED_LEN: usize = 16usize;
27202    fn deser(
27203        _version: MavlinkVersion,
27204        __input: &[u8],
27205    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27206        let avail_len = __input.len();
27207        let mut payload_buf = [0; Self::ENCODED_LEN];
27208        let mut buf = if avail_len < Self::ENCODED_LEN {
27209            payload_buf[0..avail_len].copy_from_slice(__input);
27210            Bytes::new(&payload_buf)
27211        } else {
27212            Bytes::new(__input)
27213        };
27214        let mut __struct = Self::default();
27215        __struct.time_boot_ms = buf.get_u32_le();
27216        __struct.press_abs = buf.get_f32_le();
27217        __struct.press_diff = buf.get_f32_le();
27218        __struct.temperature = buf.get_i16_le();
27219        __struct.temperature_press_diff = buf.get_i16_le();
27220        Ok(__struct)
27221    }
27222    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27223        let mut __tmp = BytesMut::new(bytes);
27224        #[allow(clippy::absurd_extreme_comparisons)]
27225        #[allow(unused_comparisons)]
27226        if __tmp.remaining() < Self::ENCODED_LEN {
27227            panic!(
27228                "buffer is too small (need {} bytes, but got {})",
27229                Self::ENCODED_LEN,
27230                __tmp.remaining(),
27231            )
27232        }
27233        __tmp.put_u32_le(self.time_boot_ms);
27234        __tmp.put_f32_le(self.press_abs);
27235        __tmp.put_f32_le(self.press_diff);
27236        __tmp.put_i16_le(self.temperature);
27237        if matches!(version, MavlinkVersion::V2) {
27238            __tmp.put_i16_le(self.temperature_press_diff);
27239            let len = __tmp.len();
27240            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27241        } else {
27242            __tmp.len()
27243        }
27244    }
27245}
27246#[doc = "Barometer readings for 3rd barometer."]
27247#[doc = ""]
27248#[doc = "ID: 143"]
27249#[derive(Debug, Clone, PartialEq)]
27250#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27251#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27252#[cfg_attr(feature = "ts", derive(TS))]
27253#[cfg_attr(feature = "ts", ts(export))]
27254pub struct SCALED_PRESSURE3_DATA {
27255    #[doc = "Timestamp (time since system boot)."]
27256    pub time_boot_ms: u32,
27257    #[doc = "Absolute pressure"]
27258    pub press_abs: f32,
27259    #[doc = "Differential pressure"]
27260    pub press_diff: f32,
27261    #[doc = "Absolute pressure temperature"]
27262    pub temperature: i16,
27263    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27264    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27265    pub temperature_press_diff: i16,
27266}
27267impl SCALED_PRESSURE3_DATA {
27268    pub const ENCODED_LEN: usize = 16usize;
27269    pub const DEFAULT: Self = Self {
27270        time_boot_ms: 0_u32,
27271        press_abs: 0.0_f32,
27272        press_diff: 0.0_f32,
27273        temperature: 0_i16,
27274        temperature_press_diff: 0_i16,
27275    };
27276    #[cfg(feature = "arbitrary")]
27277    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27278        use arbitrary::{Arbitrary, Unstructured};
27279        let mut buf = [0u8; 1024];
27280        rng.fill_bytes(&mut buf);
27281        let mut unstructured = Unstructured::new(&buf);
27282        Self::arbitrary(&mut unstructured).unwrap_or_default()
27283    }
27284}
27285impl Default for SCALED_PRESSURE3_DATA {
27286    fn default() -> Self {
27287        Self::DEFAULT.clone()
27288    }
27289}
27290impl MessageData for SCALED_PRESSURE3_DATA {
27291    type Message = MavMessage;
27292    const ID: u32 = 143u32;
27293    const NAME: &'static str = "SCALED_PRESSURE3";
27294    const EXTRA_CRC: u8 = 131u8;
27295    const ENCODED_LEN: usize = 16usize;
27296    fn deser(
27297        _version: MavlinkVersion,
27298        __input: &[u8],
27299    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27300        let avail_len = __input.len();
27301        let mut payload_buf = [0; Self::ENCODED_LEN];
27302        let mut buf = if avail_len < Self::ENCODED_LEN {
27303            payload_buf[0..avail_len].copy_from_slice(__input);
27304            Bytes::new(&payload_buf)
27305        } else {
27306            Bytes::new(__input)
27307        };
27308        let mut __struct = Self::default();
27309        __struct.time_boot_ms = buf.get_u32_le();
27310        __struct.press_abs = buf.get_f32_le();
27311        __struct.press_diff = buf.get_f32_le();
27312        __struct.temperature = buf.get_i16_le();
27313        __struct.temperature_press_diff = buf.get_i16_le();
27314        Ok(__struct)
27315    }
27316    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27317        let mut __tmp = BytesMut::new(bytes);
27318        #[allow(clippy::absurd_extreme_comparisons)]
27319        #[allow(unused_comparisons)]
27320        if __tmp.remaining() < Self::ENCODED_LEN {
27321            panic!(
27322                "buffer is too small (need {} bytes, but got {})",
27323                Self::ENCODED_LEN,
27324                __tmp.remaining(),
27325            )
27326        }
27327        __tmp.put_u32_le(self.time_boot_ms);
27328        __tmp.put_f32_le(self.press_abs);
27329        __tmp.put_f32_le(self.press_diff);
27330        __tmp.put_i16_le(self.temperature);
27331        if matches!(version, MavlinkVersion::V2) {
27332            __tmp.put_i16_le(self.temperature_press_diff);
27333            let len = __tmp.len();
27334            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27335        } else {
27336            __tmp.len()
27337        }
27338    }
27339}
27340#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
27341#[doc = ""]
27342#[doc = "ID: 126"]
27343#[derive(Debug, Clone, PartialEq)]
27344#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27345#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27346#[cfg_attr(feature = "ts", derive(TS))]
27347#[cfg_attr(feature = "ts", ts(export))]
27348pub struct SERIAL_CONTROL_DATA {
27349    #[doc = "Baudrate of transfer. Zero means no change."]
27350    pub baudrate: u32,
27351    #[doc = "Timeout for reply data"]
27352    pub timeout: u16,
27353    #[doc = "Serial control device type."]
27354    pub device: SerialControlDev,
27355    #[doc = "Bitmap of serial control flags."]
27356    pub flags: SerialControlFlag,
27357    #[doc = "how many bytes in this transfer"]
27358    pub count: u8,
27359    #[doc = "serial data"]
27360    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27361    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27362    pub data: [u8; 70],
27363    #[doc = "System ID"]
27364    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27365    pub target_system: u8,
27366    #[doc = "Component ID"]
27367    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27368    pub target_component: u8,
27369}
27370impl SERIAL_CONTROL_DATA {
27371    pub const ENCODED_LEN: usize = 81usize;
27372    pub const DEFAULT: Self = Self {
27373        baudrate: 0_u32,
27374        timeout: 0_u16,
27375        device: SerialControlDev::DEFAULT,
27376        flags: SerialControlFlag::DEFAULT,
27377        count: 0_u8,
27378        data: [0_u8; 70usize],
27379        target_system: 0_u8,
27380        target_component: 0_u8,
27381    };
27382    #[cfg(feature = "arbitrary")]
27383    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27384        use arbitrary::{Arbitrary, Unstructured};
27385        let mut buf = [0u8; 1024];
27386        rng.fill_bytes(&mut buf);
27387        let mut unstructured = Unstructured::new(&buf);
27388        Self::arbitrary(&mut unstructured).unwrap_or_default()
27389    }
27390}
27391impl Default for SERIAL_CONTROL_DATA {
27392    fn default() -> Self {
27393        Self::DEFAULT.clone()
27394    }
27395}
27396impl MessageData for SERIAL_CONTROL_DATA {
27397    type Message = MavMessage;
27398    const ID: u32 = 126u32;
27399    const NAME: &'static str = "SERIAL_CONTROL";
27400    const EXTRA_CRC: u8 = 220u8;
27401    const ENCODED_LEN: usize = 81usize;
27402    fn deser(
27403        _version: MavlinkVersion,
27404        __input: &[u8],
27405    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27406        let avail_len = __input.len();
27407        let mut payload_buf = [0; Self::ENCODED_LEN];
27408        let mut buf = if avail_len < Self::ENCODED_LEN {
27409            payload_buf[0..avail_len].copy_from_slice(__input);
27410            Bytes::new(&payload_buf)
27411        } else {
27412            Bytes::new(__input)
27413        };
27414        let mut __struct = Self::default();
27415        __struct.baudrate = buf.get_u32_le();
27416        __struct.timeout = buf.get_u16_le();
27417        let tmp = buf.get_u8();
27418        __struct.device =
27419            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27420                enum_type: "SerialControlDev",
27421                value: tmp as u32,
27422            })?;
27423        let tmp = buf.get_u8();
27424        __struct.flags = SerialControlFlag::from_bits(tmp & SerialControlFlag::all().bits())
27425            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27426                flag_type: "SerialControlFlag",
27427                value: tmp as u32,
27428            })?;
27429        __struct.count = buf.get_u8();
27430        for v in &mut __struct.data {
27431            let val = buf.get_u8();
27432            *v = val;
27433        }
27434        __struct.target_system = buf.get_u8();
27435        __struct.target_component = buf.get_u8();
27436        Ok(__struct)
27437    }
27438    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27439        let mut __tmp = BytesMut::new(bytes);
27440        #[allow(clippy::absurd_extreme_comparisons)]
27441        #[allow(unused_comparisons)]
27442        if __tmp.remaining() < Self::ENCODED_LEN {
27443            panic!(
27444                "buffer is too small (need {} bytes, but got {})",
27445                Self::ENCODED_LEN,
27446                __tmp.remaining(),
27447            )
27448        }
27449        __tmp.put_u32_le(self.baudrate);
27450        __tmp.put_u16_le(self.timeout);
27451        __tmp.put_u8(self.device as u8);
27452        __tmp.put_u8(self.flags.bits());
27453        __tmp.put_u8(self.count);
27454        for val in &self.data {
27455            __tmp.put_u8(*val);
27456        }
27457        if matches!(version, MavlinkVersion::V2) {
27458            __tmp.put_u8(self.target_system);
27459            __tmp.put_u8(self.target_component);
27460            let len = __tmp.len();
27461            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27462        } else {
27463            __tmp.len()
27464        }
27465    }
27466}
27467#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
27468#[doc = ""]
27469#[doc = "ID: 36"]
27470#[derive(Debug, Clone, PartialEq)]
27471#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27472#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27473#[cfg_attr(feature = "ts", derive(TS))]
27474#[cfg_attr(feature = "ts", ts(export))]
27475pub struct SERVO_OUTPUT_RAW_DATA {
27476    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27477    pub time_usec: u32,
27478    #[doc = "Servo output 1 value"]
27479    pub servo1_raw: u16,
27480    #[doc = "Servo output 2 value"]
27481    pub servo2_raw: u16,
27482    #[doc = "Servo output 3 value"]
27483    pub servo3_raw: u16,
27484    #[doc = "Servo output 4 value"]
27485    pub servo4_raw: u16,
27486    #[doc = "Servo output 5 value"]
27487    pub servo5_raw: u16,
27488    #[doc = "Servo output 6 value"]
27489    pub servo6_raw: u16,
27490    #[doc = "Servo output 7 value"]
27491    pub servo7_raw: u16,
27492    #[doc = "Servo output 8 value"]
27493    pub servo8_raw: u16,
27494    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
27495    pub port: u8,
27496    #[doc = "Servo output 9 value"]
27497    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27498    pub servo9_raw: u16,
27499    #[doc = "Servo output 10 value"]
27500    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27501    pub servo10_raw: u16,
27502    #[doc = "Servo output 11 value"]
27503    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27504    pub servo11_raw: u16,
27505    #[doc = "Servo output 12 value"]
27506    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27507    pub servo12_raw: u16,
27508    #[doc = "Servo output 13 value"]
27509    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27510    pub servo13_raw: u16,
27511    #[doc = "Servo output 14 value"]
27512    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27513    pub servo14_raw: u16,
27514    #[doc = "Servo output 15 value"]
27515    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27516    pub servo15_raw: u16,
27517    #[doc = "Servo output 16 value"]
27518    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27519    pub servo16_raw: u16,
27520}
27521impl SERVO_OUTPUT_RAW_DATA {
27522    pub const ENCODED_LEN: usize = 37usize;
27523    pub const DEFAULT: Self = Self {
27524        time_usec: 0_u32,
27525        servo1_raw: 0_u16,
27526        servo2_raw: 0_u16,
27527        servo3_raw: 0_u16,
27528        servo4_raw: 0_u16,
27529        servo5_raw: 0_u16,
27530        servo6_raw: 0_u16,
27531        servo7_raw: 0_u16,
27532        servo8_raw: 0_u16,
27533        port: 0_u8,
27534        servo9_raw: 0_u16,
27535        servo10_raw: 0_u16,
27536        servo11_raw: 0_u16,
27537        servo12_raw: 0_u16,
27538        servo13_raw: 0_u16,
27539        servo14_raw: 0_u16,
27540        servo15_raw: 0_u16,
27541        servo16_raw: 0_u16,
27542    };
27543    #[cfg(feature = "arbitrary")]
27544    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27545        use arbitrary::{Arbitrary, Unstructured};
27546        let mut buf = [0u8; 1024];
27547        rng.fill_bytes(&mut buf);
27548        let mut unstructured = Unstructured::new(&buf);
27549        Self::arbitrary(&mut unstructured).unwrap_or_default()
27550    }
27551}
27552impl Default for SERVO_OUTPUT_RAW_DATA {
27553    fn default() -> Self {
27554        Self::DEFAULT.clone()
27555    }
27556}
27557impl MessageData for SERVO_OUTPUT_RAW_DATA {
27558    type Message = MavMessage;
27559    const ID: u32 = 36u32;
27560    const NAME: &'static str = "SERVO_OUTPUT_RAW";
27561    const EXTRA_CRC: u8 = 222u8;
27562    const ENCODED_LEN: usize = 37usize;
27563    fn deser(
27564        _version: MavlinkVersion,
27565        __input: &[u8],
27566    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27567        let avail_len = __input.len();
27568        let mut payload_buf = [0; Self::ENCODED_LEN];
27569        let mut buf = if avail_len < Self::ENCODED_LEN {
27570            payload_buf[0..avail_len].copy_from_slice(__input);
27571            Bytes::new(&payload_buf)
27572        } else {
27573            Bytes::new(__input)
27574        };
27575        let mut __struct = Self::default();
27576        __struct.time_usec = buf.get_u32_le();
27577        __struct.servo1_raw = buf.get_u16_le();
27578        __struct.servo2_raw = buf.get_u16_le();
27579        __struct.servo3_raw = buf.get_u16_le();
27580        __struct.servo4_raw = buf.get_u16_le();
27581        __struct.servo5_raw = buf.get_u16_le();
27582        __struct.servo6_raw = buf.get_u16_le();
27583        __struct.servo7_raw = buf.get_u16_le();
27584        __struct.servo8_raw = buf.get_u16_le();
27585        __struct.port = buf.get_u8();
27586        __struct.servo9_raw = buf.get_u16_le();
27587        __struct.servo10_raw = buf.get_u16_le();
27588        __struct.servo11_raw = buf.get_u16_le();
27589        __struct.servo12_raw = buf.get_u16_le();
27590        __struct.servo13_raw = buf.get_u16_le();
27591        __struct.servo14_raw = buf.get_u16_le();
27592        __struct.servo15_raw = buf.get_u16_le();
27593        __struct.servo16_raw = buf.get_u16_le();
27594        Ok(__struct)
27595    }
27596    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27597        let mut __tmp = BytesMut::new(bytes);
27598        #[allow(clippy::absurd_extreme_comparisons)]
27599        #[allow(unused_comparisons)]
27600        if __tmp.remaining() < Self::ENCODED_LEN {
27601            panic!(
27602                "buffer is too small (need {} bytes, but got {})",
27603                Self::ENCODED_LEN,
27604                __tmp.remaining(),
27605            )
27606        }
27607        __tmp.put_u32_le(self.time_usec);
27608        __tmp.put_u16_le(self.servo1_raw);
27609        __tmp.put_u16_le(self.servo2_raw);
27610        __tmp.put_u16_le(self.servo3_raw);
27611        __tmp.put_u16_le(self.servo4_raw);
27612        __tmp.put_u16_le(self.servo5_raw);
27613        __tmp.put_u16_le(self.servo6_raw);
27614        __tmp.put_u16_le(self.servo7_raw);
27615        __tmp.put_u16_le(self.servo8_raw);
27616        __tmp.put_u8(self.port);
27617        if matches!(version, MavlinkVersion::V2) {
27618            __tmp.put_u16_le(self.servo9_raw);
27619            __tmp.put_u16_le(self.servo10_raw);
27620            __tmp.put_u16_le(self.servo11_raw);
27621            __tmp.put_u16_le(self.servo12_raw);
27622            __tmp.put_u16_le(self.servo13_raw);
27623            __tmp.put_u16_le(self.servo14_raw);
27624            __tmp.put_u16_le(self.servo15_raw);
27625            __tmp.put_u16_le(self.servo16_raw);
27626            let len = __tmp.len();
27627            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27628        } else {
27629            __tmp.len()
27630        }
27631    }
27632}
27633#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
27634#[doc = ""]
27635#[doc = "ID: 256"]
27636#[derive(Debug, Clone, PartialEq)]
27637#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27638#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27639#[cfg_attr(feature = "ts", derive(TS))]
27640#[cfg_attr(feature = "ts", ts(export))]
27641pub struct SETUP_SIGNING_DATA {
27642    #[doc = "initial timestamp"]
27643    pub initial_timestamp: u64,
27644    #[doc = "system id of the target"]
27645    pub target_system: u8,
27646    #[doc = "component ID of the target"]
27647    pub target_component: u8,
27648    #[doc = "signing key"]
27649    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27650    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27651    pub secret_key: [u8; 32],
27652}
27653impl SETUP_SIGNING_DATA {
27654    pub const ENCODED_LEN: usize = 42usize;
27655    pub const DEFAULT: Self = Self {
27656        initial_timestamp: 0_u64,
27657        target_system: 0_u8,
27658        target_component: 0_u8,
27659        secret_key: [0_u8; 32usize],
27660    };
27661    #[cfg(feature = "arbitrary")]
27662    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27663        use arbitrary::{Arbitrary, Unstructured};
27664        let mut buf = [0u8; 1024];
27665        rng.fill_bytes(&mut buf);
27666        let mut unstructured = Unstructured::new(&buf);
27667        Self::arbitrary(&mut unstructured).unwrap_or_default()
27668    }
27669}
27670impl Default for SETUP_SIGNING_DATA {
27671    fn default() -> Self {
27672        Self::DEFAULT.clone()
27673    }
27674}
27675impl MessageData for SETUP_SIGNING_DATA {
27676    type Message = MavMessage;
27677    const ID: u32 = 256u32;
27678    const NAME: &'static str = "SETUP_SIGNING";
27679    const EXTRA_CRC: u8 = 71u8;
27680    const ENCODED_LEN: usize = 42usize;
27681    fn deser(
27682        _version: MavlinkVersion,
27683        __input: &[u8],
27684    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27685        let avail_len = __input.len();
27686        let mut payload_buf = [0; Self::ENCODED_LEN];
27687        let mut buf = if avail_len < Self::ENCODED_LEN {
27688            payload_buf[0..avail_len].copy_from_slice(__input);
27689            Bytes::new(&payload_buf)
27690        } else {
27691            Bytes::new(__input)
27692        };
27693        let mut __struct = Self::default();
27694        __struct.initial_timestamp = buf.get_u64_le();
27695        __struct.target_system = buf.get_u8();
27696        __struct.target_component = buf.get_u8();
27697        for v in &mut __struct.secret_key {
27698            let val = buf.get_u8();
27699            *v = val;
27700        }
27701        Ok(__struct)
27702    }
27703    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27704        let mut __tmp = BytesMut::new(bytes);
27705        #[allow(clippy::absurd_extreme_comparisons)]
27706        #[allow(unused_comparisons)]
27707        if __tmp.remaining() < Self::ENCODED_LEN {
27708            panic!(
27709                "buffer is too small (need {} bytes, but got {})",
27710                Self::ENCODED_LEN,
27711                __tmp.remaining(),
27712            )
27713        }
27714        __tmp.put_u64_le(self.initial_timestamp);
27715        __tmp.put_u8(self.target_system);
27716        __tmp.put_u8(self.target_component);
27717        for val in &self.secret_key {
27718            __tmp.put_u8(*val);
27719        }
27720        if matches!(version, MavlinkVersion::V2) {
27721            let len = __tmp.len();
27722            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27723        } else {
27724            __tmp.len()
27725        }
27726    }
27727}
27728#[doc = "Set the vehicle attitude and body angular rates."]
27729#[doc = ""]
27730#[doc = "ID: 139"]
27731#[derive(Debug, Clone, PartialEq)]
27732#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27733#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27734#[cfg_attr(feature = "ts", derive(TS))]
27735#[cfg_attr(feature = "ts", ts(export))]
27736pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
27737    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27738    pub time_usec: u64,
27739    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
27740    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27741    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27742    pub controls: [f32; 8],
27743    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
27744    pub group_mlx: u8,
27745    #[doc = "System ID"]
27746    pub target_system: u8,
27747    #[doc = "Component ID"]
27748    pub target_component: u8,
27749}
27750impl SET_ACTUATOR_CONTROL_TARGET_DATA {
27751    pub const ENCODED_LEN: usize = 43usize;
27752    pub const DEFAULT: Self = Self {
27753        time_usec: 0_u64,
27754        controls: [0.0_f32; 8usize],
27755        group_mlx: 0_u8,
27756        target_system: 0_u8,
27757        target_component: 0_u8,
27758    };
27759    #[cfg(feature = "arbitrary")]
27760    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27761        use arbitrary::{Arbitrary, Unstructured};
27762        let mut buf = [0u8; 1024];
27763        rng.fill_bytes(&mut buf);
27764        let mut unstructured = Unstructured::new(&buf);
27765        Self::arbitrary(&mut unstructured).unwrap_or_default()
27766    }
27767}
27768impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
27769    fn default() -> Self {
27770        Self::DEFAULT.clone()
27771    }
27772}
27773impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
27774    type Message = MavMessage;
27775    const ID: u32 = 139u32;
27776    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
27777    const EXTRA_CRC: u8 = 168u8;
27778    const ENCODED_LEN: usize = 43usize;
27779    fn deser(
27780        _version: MavlinkVersion,
27781        __input: &[u8],
27782    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27783        let avail_len = __input.len();
27784        let mut payload_buf = [0; Self::ENCODED_LEN];
27785        let mut buf = if avail_len < Self::ENCODED_LEN {
27786            payload_buf[0..avail_len].copy_from_slice(__input);
27787            Bytes::new(&payload_buf)
27788        } else {
27789            Bytes::new(__input)
27790        };
27791        let mut __struct = Self::default();
27792        __struct.time_usec = buf.get_u64_le();
27793        for v in &mut __struct.controls {
27794            let val = buf.get_f32_le();
27795            *v = val;
27796        }
27797        __struct.group_mlx = buf.get_u8();
27798        __struct.target_system = buf.get_u8();
27799        __struct.target_component = buf.get_u8();
27800        Ok(__struct)
27801    }
27802    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27803        let mut __tmp = BytesMut::new(bytes);
27804        #[allow(clippy::absurd_extreme_comparisons)]
27805        #[allow(unused_comparisons)]
27806        if __tmp.remaining() < Self::ENCODED_LEN {
27807            panic!(
27808                "buffer is too small (need {} bytes, but got {})",
27809                Self::ENCODED_LEN,
27810                __tmp.remaining(),
27811            )
27812        }
27813        __tmp.put_u64_le(self.time_usec);
27814        for val in &self.controls {
27815            __tmp.put_f32_le(*val);
27816        }
27817        __tmp.put_u8(self.group_mlx);
27818        __tmp.put_u8(self.target_system);
27819        __tmp.put_u8(self.target_component);
27820        if matches!(version, MavlinkVersion::V2) {
27821            let len = __tmp.len();
27822            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27823        } else {
27824            __tmp.len()
27825        }
27826    }
27827}
27828#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
27829#[doc = ""]
27830#[doc = "ID: 82"]
27831#[derive(Debug, Clone, PartialEq)]
27832#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27833#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27834#[cfg_attr(feature = "ts", derive(TS))]
27835#[cfg_attr(feature = "ts", ts(export))]
27836pub struct SET_ATTITUDE_TARGET_DATA {
27837    #[doc = "Timestamp (time since system boot)."]
27838    pub time_boot_ms: u32,
27839    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
27840    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27841    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27842    pub q: [f32; 4],
27843    #[doc = "Body roll rate"]
27844    pub body_roll_rate: f32,
27845    #[doc = "Body pitch rate"]
27846    pub body_pitch_rate: f32,
27847    #[doc = "Body yaw rate"]
27848    pub body_yaw_rate: f32,
27849    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
27850    pub thrust: f32,
27851    #[doc = "System ID"]
27852    pub target_system: u8,
27853    #[doc = "Component ID"]
27854    pub target_component: u8,
27855    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
27856    pub type_mask: AttitudeTargetTypemask,
27857    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
27858    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27859    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27860    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27861    pub thrust_body: [f32; 3],
27862}
27863impl SET_ATTITUDE_TARGET_DATA {
27864    pub const ENCODED_LEN: usize = 51usize;
27865    pub const DEFAULT: Self = Self {
27866        time_boot_ms: 0_u32,
27867        q: [0.0_f32; 4usize],
27868        body_roll_rate: 0.0_f32,
27869        body_pitch_rate: 0.0_f32,
27870        body_yaw_rate: 0.0_f32,
27871        thrust: 0.0_f32,
27872        target_system: 0_u8,
27873        target_component: 0_u8,
27874        type_mask: AttitudeTargetTypemask::DEFAULT,
27875        thrust_body: [0.0_f32; 3usize],
27876    };
27877    #[cfg(feature = "arbitrary")]
27878    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27879        use arbitrary::{Arbitrary, Unstructured};
27880        let mut buf = [0u8; 1024];
27881        rng.fill_bytes(&mut buf);
27882        let mut unstructured = Unstructured::new(&buf);
27883        Self::arbitrary(&mut unstructured).unwrap_or_default()
27884    }
27885}
27886impl Default for SET_ATTITUDE_TARGET_DATA {
27887    fn default() -> Self {
27888        Self::DEFAULT.clone()
27889    }
27890}
27891impl MessageData for SET_ATTITUDE_TARGET_DATA {
27892    type Message = MavMessage;
27893    const ID: u32 = 82u32;
27894    const NAME: &'static str = "SET_ATTITUDE_TARGET";
27895    const EXTRA_CRC: u8 = 49u8;
27896    const ENCODED_LEN: usize = 51usize;
27897    fn deser(
27898        _version: MavlinkVersion,
27899        __input: &[u8],
27900    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27901        let avail_len = __input.len();
27902        let mut payload_buf = [0; Self::ENCODED_LEN];
27903        let mut buf = if avail_len < Self::ENCODED_LEN {
27904            payload_buf[0..avail_len].copy_from_slice(__input);
27905            Bytes::new(&payload_buf)
27906        } else {
27907            Bytes::new(__input)
27908        };
27909        let mut __struct = Self::default();
27910        __struct.time_boot_ms = buf.get_u32_le();
27911        for v in &mut __struct.q {
27912            let val = buf.get_f32_le();
27913            *v = val;
27914        }
27915        __struct.body_roll_rate = buf.get_f32_le();
27916        __struct.body_pitch_rate = buf.get_f32_le();
27917        __struct.body_yaw_rate = buf.get_f32_le();
27918        __struct.thrust = buf.get_f32_le();
27919        __struct.target_system = buf.get_u8();
27920        __struct.target_component = buf.get_u8();
27921        let tmp = buf.get_u8();
27922        __struct.type_mask = AttitudeTargetTypemask::from_bits(
27923            tmp & AttitudeTargetTypemask::all().bits(),
27924        )
27925        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27926            flag_type: "AttitudeTargetTypemask",
27927            value: tmp as u32,
27928        })?;
27929        for v in &mut __struct.thrust_body {
27930            let val = buf.get_f32_le();
27931            *v = val;
27932        }
27933        Ok(__struct)
27934    }
27935    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27936        let mut __tmp = BytesMut::new(bytes);
27937        #[allow(clippy::absurd_extreme_comparisons)]
27938        #[allow(unused_comparisons)]
27939        if __tmp.remaining() < Self::ENCODED_LEN {
27940            panic!(
27941                "buffer is too small (need {} bytes, but got {})",
27942                Self::ENCODED_LEN,
27943                __tmp.remaining(),
27944            )
27945        }
27946        __tmp.put_u32_le(self.time_boot_ms);
27947        for val in &self.q {
27948            __tmp.put_f32_le(*val);
27949        }
27950        __tmp.put_f32_le(self.body_roll_rate);
27951        __tmp.put_f32_le(self.body_pitch_rate);
27952        __tmp.put_f32_le(self.body_yaw_rate);
27953        __tmp.put_f32_le(self.thrust);
27954        __tmp.put_u8(self.target_system);
27955        __tmp.put_u8(self.target_component);
27956        __tmp.put_u8(self.type_mask.bits());
27957        if matches!(version, MavlinkVersion::V2) {
27958            for val in &self.thrust_body {
27959                __tmp.put_f32_le(*val);
27960            }
27961            let len = __tmp.len();
27962            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27963        } else {
27964            __tmp.len()
27965        }
27966    }
27967}
27968#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
27969#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
27970#[doc = ""]
27971#[doc = "ID: 48"]
27972#[derive(Debug, Clone, PartialEq)]
27973#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27974#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27975#[cfg_attr(feature = "ts", derive(TS))]
27976#[cfg_attr(feature = "ts", ts(export))]
27977pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
27978    #[doc = "Latitude (WGS84)"]
27979    pub latitude: i32,
27980    #[doc = "Longitude (WGS84)"]
27981    pub longitude: i32,
27982    #[doc = "Altitude (MSL). Positive for up."]
27983    pub altitude: i32,
27984    #[doc = "System ID"]
27985    pub target_system: u8,
27986    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27987    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27988    pub time_usec: u64,
27989}
27990impl SET_GPS_GLOBAL_ORIGIN_DATA {
27991    pub const ENCODED_LEN: usize = 21usize;
27992    pub const DEFAULT: Self = Self {
27993        latitude: 0_i32,
27994        longitude: 0_i32,
27995        altitude: 0_i32,
27996        target_system: 0_u8,
27997        time_usec: 0_u64,
27998    };
27999    #[cfg(feature = "arbitrary")]
28000    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28001        use arbitrary::{Arbitrary, Unstructured};
28002        let mut buf = [0u8; 1024];
28003        rng.fill_bytes(&mut buf);
28004        let mut unstructured = Unstructured::new(&buf);
28005        Self::arbitrary(&mut unstructured).unwrap_or_default()
28006    }
28007}
28008impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
28009    fn default() -> Self {
28010        Self::DEFAULT.clone()
28011    }
28012}
28013impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
28014    type Message = MavMessage;
28015    const ID: u32 = 48u32;
28016    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
28017    const EXTRA_CRC: u8 = 41u8;
28018    const ENCODED_LEN: usize = 21usize;
28019    fn deser(
28020        _version: MavlinkVersion,
28021        __input: &[u8],
28022    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28023        let avail_len = __input.len();
28024        let mut payload_buf = [0; Self::ENCODED_LEN];
28025        let mut buf = if avail_len < Self::ENCODED_LEN {
28026            payload_buf[0..avail_len].copy_from_slice(__input);
28027            Bytes::new(&payload_buf)
28028        } else {
28029            Bytes::new(__input)
28030        };
28031        let mut __struct = Self::default();
28032        __struct.latitude = buf.get_i32_le();
28033        __struct.longitude = buf.get_i32_le();
28034        __struct.altitude = buf.get_i32_le();
28035        __struct.target_system = buf.get_u8();
28036        __struct.time_usec = buf.get_u64_le();
28037        Ok(__struct)
28038    }
28039    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28040        let mut __tmp = BytesMut::new(bytes);
28041        #[allow(clippy::absurd_extreme_comparisons)]
28042        #[allow(unused_comparisons)]
28043        if __tmp.remaining() < Self::ENCODED_LEN {
28044            panic!(
28045                "buffer is too small (need {} bytes, but got {})",
28046                Self::ENCODED_LEN,
28047                __tmp.remaining(),
28048            )
28049        }
28050        __tmp.put_i32_le(self.latitude);
28051        __tmp.put_i32_le(self.longitude);
28052        __tmp.put_i32_le(self.altitude);
28053        __tmp.put_u8(self.target_system);
28054        if matches!(version, MavlinkVersion::V2) {
28055            __tmp.put_u64_le(self.time_usec);
28056            let len = __tmp.len();
28057            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28058        } else {
28059            __tmp.len()
28060        }
28061    }
28062}
28063#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
28064#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
28065#[doc = ""]
28066#[doc = "ID: 243"]
28067#[derive(Debug, Clone, PartialEq)]
28068#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28069#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28070#[cfg_attr(feature = "ts", derive(TS))]
28071#[cfg_attr(feature = "ts", ts(export))]
28072pub struct SET_HOME_POSITION_DATA {
28073    #[doc = "Latitude (WGS84)"]
28074    pub latitude: i32,
28075    #[doc = "Longitude (WGS84)"]
28076    pub longitude: i32,
28077    #[doc = "Altitude (MSL). Positive for up."]
28078    pub altitude: i32,
28079    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
28080    pub x: f32,
28081    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
28082    pub y: f32,
28083    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
28084    pub z: f32,
28085    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
28086    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28087    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28088    pub q: [f32; 4],
28089    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28090    pub approach_x: f32,
28091    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28092    pub approach_y: f32,
28093    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28094    pub approach_z: f32,
28095    #[doc = "System ID."]
28096    pub target_system: u8,
28097    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28098    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28099    pub time_usec: u64,
28100}
28101impl SET_HOME_POSITION_DATA {
28102    pub const ENCODED_LEN: usize = 61usize;
28103    pub const DEFAULT: Self = Self {
28104        latitude: 0_i32,
28105        longitude: 0_i32,
28106        altitude: 0_i32,
28107        x: 0.0_f32,
28108        y: 0.0_f32,
28109        z: 0.0_f32,
28110        q: [0.0_f32; 4usize],
28111        approach_x: 0.0_f32,
28112        approach_y: 0.0_f32,
28113        approach_z: 0.0_f32,
28114        target_system: 0_u8,
28115        time_usec: 0_u64,
28116    };
28117    #[cfg(feature = "arbitrary")]
28118    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28119        use arbitrary::{Arbitrary, Unstructured};
28120        let mut buf = [0u8; 1024];
28121        rng.fill_bytes(&mut buf);
28122        let mut unstructured = Unstructured::new(&buf);
28123        Self::arbitrary(&mut unstructured).unwrap_or_default()
28124    }
28125}
28126impl Default for SET_HOME_POSITION_DATA {
28127    fn default() -> Self {
28128        Self::DEFAULT.clone()
28129    }
28130}
28131impl MessageData for SET_HOME_POSITION_DATA {
28132    type Message = MavMessage;
28133    const ID: u32 = 243u32;
28134    const NAME: &'static str = "SET_HOME_POSITION";
28135    const EXTRA_CRC: u8 = 85u8;
28136    const ENCODED_LEN: usize = 61usize;
28137    fn deser(
28138        _version: MavlinkVersion,
28139        __input: &[u8],
28140    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28141        let avail_len = __input.len();
28142        let mut payload_buf = [0; Self::ENCODED_LEN];
28143        let mut buf = if avail_len < Self::ENCODED_LEN {
28144            payload_buf[0..avail_len].copy_from_slice(__input);
28145            Bytes::new(&payload_buf)
28146        } else {
28147            Bytes::new(__input)
28148        };
28149        let mut __struct = Self::default();
28150        __struct.latitude = buf.get_i32_le();
28151        __struct.longitude = buf.get_i32_le();
28152        __struct.altitude = buf.get_i32_le();
28153        __struct.x = buf.get_f32_le();
28154        __struct.y = buf.get_f32_le();
28155        __struct.z = buf.get_f32_le();
28156        for v in &mut __struct.q {
28157            let val = buf.get_f32_le();
28158            *v = val;
28159        }
28160        __struct.approach_x = buf.get_f32_le();
28161        __struct.approach_y = buf.get_f32_le();
28162        __struct.approach_z = buf.get_f32_le();
28163        __struct.target_system = buf.get_u8();
28164        __struct.time_usec = buf.get_u64_le();
28165        Ok(__struct)
28166    }
28167    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28168        let mut __tmp = BytesMut::new(bytes);
28169        #[allow(clippy::absurd_extreme_comparisons)]
28170        #[allow(unused_comparisons)]
28171        if __tmp.remaining() < Self::ENCODED_LEN {
28172            panic!(
28173                "buffer is too small (need {} bytes, but got {})",
28174                Self::ENCODED_LEN,
28175                __tmp.remaining(),
28176            )
28177        }
28178        __tmp.put_i32_le(self.latitude);
28179        __tmp.put_i32_le(self.longitude);
28180        __tmp.put_i32_le(self.altitude);
28181        __tmp.put_f32_le(self.x);
28182        __tmp.put_f32_le(self.y);
28183        __tmp.put_f32_le(self.z);
28184        for val in &self.q {
28185            __tmp.put_f32_le(*val);
28186        }
28187        __tmp.put_f32_le(self.approach_x);
28188        __tmp.put_f32_le(self.approach_y);
28189        __tmp.put_f32_le(self.approach_z);
28190        __tmp.put_u8(self.target_system);
28191        if matches!(version, MavlinkVersion::V2) {
28192            __tmp.put_u64_le(self.time_usec);
28193            let len = __tmp.len();
28194            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28195        } else {
28196            __tmp.len()
28197        }
28198    }
28199}
28200#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
28201#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
28202#[doc = ""]
28203#[doc = "ID: 11"]
28204#[derive(Debug, Clone, PartialEq)]
28205#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28206#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28207#[cfg_attr(feature = "ts", derive(TS))]
28208#[cfg_attr(feature = "ts", ts(export))]
28209pub struct SET_MODE_DATA {
28210    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
28211    pub custom_mode: u32,
28212    #[doc = "The system setting the mode"]
28213    pub target_system: u8,
28214    #[doc = "The new base mode."]
28215    pub base_mode: MavMode,
28216}
28217impl SET_MODE_DATA {
28218    pub const ENCODED_LEN: usize = 6usize;
28219    pub const DEFAULT: Self = Self {
28220        custom_mode: 0_u32,
28221        target_system: 0_u8,
28222        base_mode: MavMode::DEFAULT,
28223    };
28224    #[cfg(feature = "arbitrary")]
28225    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28226        use arbitrary::{Arbitrary, Unstructured};
28227        let mut buf = [0u8; 1024];
28228        rng.fill_bytes(&mut buf);
28229        let mut unstructured = Unstructured::new(&buf);
28230        Self::arbitrary(&mut unstructured).unwrap_or_default()
28231    }
28232}
28233impl Default for SET_MODE_DATA {
28234    fn default() -> Self {
28235        Self::DEFAULT.clone()
28236    }
28237}
28238impl MessageData for SET_MODE_DATA {
28239    type Message = MavMessage;
28240    const ID: u32 = 11u32;
28241    const NAME: &'static str = "SET_MODE";
28242    const EXTRA_CRC: u8 = 89u8;
28243    const ENCODED_LEN: usize = 6usize;
28244    fn deser(
28245        _version: MavlinkVersion,
28246        __input: &[u8],
28247    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28248        let avail_len = __input.len();
28249        let mut payload_buf = [0; Self::ENCODED_LEN];
28250        let mut buf = if avail_len < Self::ENCODED_LEN {
28251            payload_buf[0..avail_len].copy_from_slice(__input);
28252            Bytes::new(&payload_buf)
28253        } else {
28254            Bytes::new(__input)
28255        };
28256        let mut __struct = Self::default();
28257        __struct.custom_mode = buf.get_u32_le();
28258        __struct.target_system = buf.get_u8();
28259        let tmp = buf.get_u8();
28260        __struct.base_mode =
28261            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28262                enum_type: "MavMode",
28263                value: tmp as u32,
28264            })?;
28265        Ok(__struct)
28266    }
28267    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28268        let mut __tmp = BytesMut::new(bytes);
28269        #[allow(clippy::absurd_extreme_comparisons)]
28270        #[allow(unused_comparisons)]
28271        if __tmp.remaining() < Self::ENCODED_LEN {
28272            panic!(
28273                "buffer is too small (need {} bytes, but got {})",
28274                Self::ENCODED_LEN,
28275                __tmp.remaining(),
28276            )
28277        }
28278        __tmp.put_u32_le(self.custom_mode);
28279        __tmp.put_u8(self.target_system);
28280        __tmp.put_u8(self.base_mode as u8);
28281        if matches!(version, MavlinkVersion::V2) {
28282            let len = __tmp.len();
28283            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28284        } else {
28285            __tmp.len()
28286        }
28287    }
28288}
28289#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
28290#[doc = ""]
28291#[doc = "ID: 86"]
28292#[derive(Debug, Clone, PartialEq)]
28293#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28294#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28295#[cfg_attr(feature = "ts", derive(TS))]
28296#[cfg_attr(feature = "ts", ts(export))]
28297pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
28298    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
28299    pub time_boot_ms: u32,
28300    #[doc = "Latitude in WGS84 frame"]
28301    pub lat_int: i32,
28302    #[doc = "Longitude in WGS84 frame"]
28303    pub lon_int: i32,
28304    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
28305    pub alt: f32,
28306    #[doc = "X velocity in NED frame"]
28307    pub vx: f32,
28308    #[doc = "Y velocity in NED frame"]
28309    pub vy: f32,
28310    #[doc = "Z velocity in NED frame"]
28311    pub vz: f32,
28312    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28313    pub afx: f32,
28314    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28315    pub afy: f32,
28316    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28317    pub afz: f32,
28318    #[doc = "yaw setpoint"]
28319    pub yaw: f32,
28320    #[doc = "yaw rate setpoint"]
28321    pub yaw_rate: f32,
28322    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28323    pub type_mask: PositionTargetTypemask,
28324    #[doc = "System ID"]
28325    pub target_system: u8,
28326    #[doc = "Component ID"]
28327    pub target_component: u8,
28328    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
28329    pub coordinate_frame: MavFrame,
28330}
28331impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
28332    pub const ENCODED_LEN: usize = 53usize;
28333    pub const DEFAULT: Self = Self {
28334        time_boot_ms: 0_u32,
28335        lat_int: 0_i32,
28336        lon_int: 0_i32,
28337        alt: 0.0_f32,
28338        vx: 0.0_f32,
28339        vy: 0.0_f32,
28340        vz: 0.0_f32,
28341        afx: 0.0_f32,
28342        afy: 0.0_f32,
28343        afz: 0.0_f32,
28344        yaw: 0.0_f32,
28345        yaw_rate: 0.0_f32,
28346        type_mask: PositionTargetTypemask::DEFAULT,
28347        target_system: 0_u8,
28348        target_component: 0_u8,
28349        coordinate_frame: MavFrame::DEFAULT,
28350    };
28351    #[cfg(feature = "arbitrary")]
28352    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28353        use arbitrary::{Arbitrary, Unstructured};
28354        let mut buf = [0u8; 1024];
28355        rng.fill_bytes(&mut buf);
28356        let mut unstructured = Unstructured::new(&buf);
28357        Self::arbitrary(&mut unstructured).unwrap_or_default()
28358    }
28359}
28360impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28361    fn default() -> Self {
28362        Self::DEFAULT.clone()
28363    }
28364}
28365impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28366    type Message = MavMessage;
28367    const ID: u32 = 86u32;
28368    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
28369    const EXTRA_CRC: u8 = 5u8;
28370    const ENCODED_LEN: usize = 53usize;
28371    fn deser(
28372        _version: MavlinkVersion,
28373        __input: &[u8],
28374    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28375        let avail_len = __input.len();
28376        let mut payload_buf = [0; Self::ENCODED_LEN];
28377        let mut buf = if avail_len < Self::ENCODED_LEN {
28378            payload_buf[0..avail_len].copy_from_slice(__input);
28379            Bytes::new(&payload_buf)
28380        } else {
28381            Bytes::new(__input)
28382        };
28383        let mut __struct = Self::default();
28384        __struct.time_boot_ms = buf.get_u32_le();
28385        __struct.lat_int = buf.get_i32_le();
28386        __struct.lon_int = buf.get_i32_le();
28387        __struct.alt = buf.get_f32_le();
28388        __struct.vx = buf.get_f32_le();
28389        __struct.vy = buf.get_f32_le();
28390        __struct.vz = buf.get_f32_le();
28391        __struct.afx = buf.get_f32_le();
28392        __struct.afy = buf.get_f32_le();
28393        __struct.afz = buf.get_f32_le();
28394        __struct.yaw = buf.get_f32_le();
28395        __struct.yaw_rate = buf.get_f32_le();
28396        let tmp = buf.get_u16_le();
28397        __struct.type_mask = PositionTargetTypemask::from_bits(
28398            tmp & PositionTargetTypemask::all().bits(),
28399        )
28400        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28401            flag_type: "PositionTargetTypemask",
28402            value: tmp as u32,
28403        })?;
28404        __struct.target_system = buf.get_u8();
28405        __struct.target_component = buf.get_u8();
28406        let tmp = buf.get_u8();
28407        __struct.coordinate_frame =
28408            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28409                enum_type: "MavFrame",
28410                value: tmp as u32,
28411            })?;
28412        Ok(__struct)
28413    }
28414    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28415        let mut __tmp = BytesMut::new(bytes);
28416        #[allow(clippy::absurd_extreme_comparisons)]
28417        #[allow(unused_comparisons)]
28418        if __tmp.remaining() < Self::ENCODED_LEN {
28419            panic!(
28420                "buffer is too small (need {} bytes, but got {})",
28421                Self::ENCODED_LEN,
28422                __tmp.remaining(),
28423            )
28424        }
28425        __tmp.put_u32_le(self.time_boot_ms);
28426        __tmp.put_i32_le(self.lat_int);
28427        __tmp.put_i32_le(self.lon_int);
28428        __tmp.put_f32_le(self.alt);
28429        __tmp.put_f32_le(self.vx);
28430        __tmp.put_f32_le(self.vy);
28431        __tmp.put_f32_le(self.vz);
28432        __tmp.put_f32_le(self.afx);
28433        __tmp.put_f32_le(self.afy);
28434        __tmp.put_f32_le(self.afz);
28435        __tmp.put_f32_le(self.yaw);
28436        __tmp.put_f32_le(self.yaw_rate);
28437        __tmp.put_u16_le(self.type_mask.bits());
28438        __tmp.put_u8(self.target_system);
28439        __tmp.put_u8(self.target_component);
28440        __tmp.put_u8(self.coordinate_frame as u8);
28441        if matches!(version, MavlinkVersion::V2) {
28442            let len = __tmp.len();
28443            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28444        } else {
28445            __tmp.len()
28446        }
28447    }
28448}
28449#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
28450#[doc = ""]
28451#[doc = "ID: 84"]
28452#[derive(Debug, Clone, PartialEq)]
28453#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28454#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28455#[cfg_attr(feature = "ts", derive(TS))]
28456#[cfg_attr(feature = "ts", ts(export))]
28457pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
28458    #[doc = "Timestamp (time since system boot)."]
28459    pub time_boot_ms: u32,
28460    #[doc = "X Position in NED frame"]
28461    pub x: f32,
28462    #[doc = "Y Position in NED frame"]
28463    pub y: f32,
28464    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
28465    pub z: f32,
28466    #[doc = "X velocity in NED frame"]
28467    pub vx: f32,
28468    #[doc = "Y velocity in NED frame"]
28469    pub vy: f32,
28470    #[doc = "Z velocity in NED frame"]
28471    pub vz: f32,
28472    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28473    pub afx: f32,
28474    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28475    pub afy: f32,
28476    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28477    pub afz: f32,
28478    #[doc = "yaw setpoint"]
28479    pub yaw: f32,
28480    #[doc = "yaw rate setpoint"]
28481    pub yaw_rate: f32,
28482    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28483    pub type_mask: PositionTargetTypemask,
28484    #[doc = "System ID"]
28485    pub target_system: u8,
28486    #[doc = "Component ID"]
28487    pub target_component: u8,
28488    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
28489    pub coordinate_frame: MavFrame,
28490}
28491impl SET_POSITION_TARGET_LOCAL_NED_DATA {
28492    pub const ENCODED_LEN: usize = 53usize;
28493    pub const DEFAULT: Self = Self {
28494        time_boot_ms: 0_u32,
28495        x: 0.0_f32,
28496        y: 0.0_f32,
28497        z: 0.0_f32,
28498        vx: 0.0_f32,
28499        vy: 0.0_f32,
28500        vz: 0.0_f32,
28501        afx: 0.0_f32,
28502        afy: 0.0_f32,
28503        afz: 0.0_f32,
28504        yaw: 0.0_f32,
28505        yaw_rate: 0.0_f32,
28506        type_mask: PositionTargetTypemask::DEFAULT,
28507        target_system: 0_u8,
28508        target_component: 0_u8,
28509        coordinate_frame: MavFrame::DEFAULT,
28510    };
28511    #[cfg(feature = "arbitrary")]
28512    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28513        use arbitrary::{Arbitrary, Unstructured};
28514        let mut buf = [0u8; 1024];
28515        rng.fill_bytes(&mut buf);
28516        let mut unstructured = Unstructured::new(&buf);
28517        Self::arbitrary(&mut unstructured).unwrap_or_default()
28518    }
28519}
28520impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
28521    fn default() -> Self {
28522        Self::DEFAULT.clone()
28523    }
28524}
28525impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
28526    type Message = MavMessage;
28527    const ID: u32 = 84u32;
28528    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
28529    const EXTRA_CRC: u8 = 143u8;
28530    const ENCODED_LEN: usize = 53usize;
28531    fn deser(
28532        _version: MavlinkVersion,
28533        __input: &[u8],
28534    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28535        let avail_len = __input.len();
28536        let mut payload_buf = [0; Self::ENCODED_LEN];
28537        let mut buf = if avail_len < Self::ENCODED_LEN {
28538            payload_buf[0..avail_len].copy_from_slice(__input);
28539            Bytes::new(&payload_buf)
28540        } else {
28541            Bytes::new(__input)
28542        };
28543        let mut __struct = Self::default();
28544        __struct.time_boot_ms = buf.get_u32_le();
28545        __struct.x = buf.get_f32_le();
28546        __struct.y = buf.get_f32_le();
28547        __struct.z = buf.get_f32_le();
28548        __struct.vx = buf.get_f32_le();
28549        __struct.vy = buf.get_f32_le();
28550        __struct.vz = buf.get_f32_le();
28551        __struct.afx = buf.get_f32_le();
28552        __struct.afy = buf.get_f32_le();
28553        __struct.afz = buf.get_f32_le();
28554        __struct.yaw = buf.get_f32_le();
28555        __struct.yaw_rate = buf.get_f32_le();
28556        let tmp = buf.get_u16_le();
28557        __struct.type_mask = PositionTargetTypemask::from_bits(
28558            tmp & PositionTargetTypemask::all().bits(),
28559        )
28560        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28561            flag_type: "PositionTargetTypemask",
28562            value: tmp as u32,
28563        })?;
28564        __struct.target_system = buf.get_u8();
28565        __struct.target_component = buf.get_u8();
28566        let tmp = buf.get_u8();
28567        __struct.coordinate_frame =
28568            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28569                enum_type: "MavFrame",
28570                value: tmp as u32,
28571            })?;
28572        Ok(__struct)
28573    }
28574    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28575        let mut __tmp = BytesMut::new(bytes);
28576        #[allow(clippy::absurd_extreme_comparisons)]
28577        #[allow(unused_comparisons)]
28578        if __tmp.remaining() < Self::ENCODED_LEN {
28579            panic!(
28580                "buffer is too small (need {} bytes, but got {})",
28581                Self::ENCODED_LEN,
28582                __tmp.remaining(),
28583            )
28584        }
28585        __tmp.put_u32_le(self.time_boot_ms);
28586        __tmp.put_f32_le(self.x);
28587        __tmp.put_f32_le(self.y);
28588        __tmp.put_f32_le(self.z);
28589        __tmp.put_f32_le(self.vx);
28590        __tmp.put_f32_le(self.vy);
28591        __tmp.put_f32_le(self.vz);
28592        __tmp.put_f32_le(self.afx);
28593        __tmp.put_f32_le(self.afy);
28594        __tmp.put_f32_le(self.afz);
28595        __tmp.put_f32_le(self.yaw);
28596        __tmp.put_f32_le(self.yaw_rate);
28597        __tmp.put_u16_le(self.type_mask.bits());
28598        __tmp.put_u8(self.target_system);
28599        __tmp.put_u8(self.target_component);
28600        __tmp.put_u8(self.coordinate_frame as u8);
28601        if matches!(version, MavlinkVersion::V2) {
28602            let len = __tmp.len();
28603            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28604        } else {
28605            __tmp.len()
28606        }
28607    }
28608}
28609#[doc = "Status of simulation environment, if used."]
28610#[doc = ""]
28611#[doc = "ID: 108"]
28612#[derive(Debug, Clone, PartialEq)]
28613#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28614#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28615#[cfg_attr(feature = "ts", derive(TS))]
28616#[cfg_attr(feature = "ts", ts(export))]
28617pub struct SIM_STATE_DATA {
28618    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
28619    pub q1: f32,
28620    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
28621    pub q2: f32,
28622    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
28623    pub q3: f32,
28624    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
28625    pub q4: f32,
28626    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
28627    pub roll: f32,
28628    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
28629    pub pitch: f32,
28630    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
28631    pub yaw: f32,
28632    #[doc = "X acceleration"]
28633    pub xacc: f32,
28634    #[doc = "Y acceleration"]
28635    pub yacc: f32,
28636    #[doc = "Z acceleration"]
28637    pub zacc: f32,
28638    #[doc = "Angular speed around X axis"]
28639    pub xgyro: f32,
28640    #[doc = "Angular speed around Y axis"]
28641    pub ygyro: f32,
28642    #[doc = "Angular speed around Z axis"]
28643    pub zgyro: f32,
28644    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
28645    pub lat: f32,
28646    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
28647    pub lon: f32,
28648    #[doc = "Altitude"]
28649    pub alt: f32,
28650    #[doc = "Horizontal position standard deviation"]
28651    pub std_dev_horz: f32,
28652    #[doc = "Vertical position standard deviation"]
28653    pub std_dev_vert: f32,
28654    #[doc = "True velocity in north direction in earth-fixed NED frame"]
28655    pub vn: f32,
28656    #[doc = "True velocity in east direction in earth-fixed NED frame"]
28657    pub ve: f32,
28658    #[doc = "True velocity in down direction in earth-fixed NED frame"]
28659    pub vd: f32,
28660    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
28661    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28662    pub lat_int: i32,
28663    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
28664    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28665    pub lon_int: i32,
28666}
28667impl SIM_STATE_DATA {
28668    pub const ENCODED_LEN: usize = 92usize;
28669    pub const DEFAULT: Self = Self {
28670        q1: 0.0_f32,
28671        q2: 0.0_f32,
28672        q3: 0.0_f32,
28673        q4: 0.0_f32,
28674        roll: 0.0_f32,
28675        pitch: 0.0_f32,
28676        yaw: 0.0_f32,
28677        xacc: 0.0_f32,
28678        yacc: 0.0_f32,
28679        zacc: 0.0_f32,
28680        xgyro: 0.0_f32,
28681        ygyro: 0.0_f32,
28682        zgyro: 0.0_f32,
28683        lat: 0.0_f32,
28684        lon: 0.0_f32,
28685        alt: 0.0_f32,
28686        std_dev_horz: 0.0_f32,
28687        std_dev_vert: 0.0_f32,
28688        vn: 0.0_f32,
28689        ve: 0.0_f32,
28690        vd: 0.0_f32,
28691        lat_int: 0_i32,
28692        lon_int: 0_i32,
28693    };
28694    #[cfg(feature = "arbitrary")]
28695    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28696        use arbitrary::{Arbitrary, Unstructured};
28697        let mut buf = [0u8; 1024];
28698        rng.fill_bytes(&mut buf);
28699        let mut unstructured = Unstructured::new(&buf);
28700        Self::arbitrary(&mut unstructured).unwrap_or_default()
28701    }
28702}
28703impl Default for SIM_STATE_DATA {
28704    fn default() -> Self {
28705        Self::DEFAULT.clone()
28706    }
28707}
28708impl MessageData for SIM_STATE_DATA {
28709    type Message = MavMessage;
28710    const ID: u32 = 108u32;
28711    const NAME: &'static str = "SIM_STATE";
28712    const EXTRA_CRC: u8 = 32u8;
28713    const ENCODED_LEN: usize = 92usize;
28714    fn deser(
28715        _version: MavlinkVersion,
28716        __input: &[u8],
28717    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28718        let avail_len = __input.len();
28719        let mut payload_buf = [0; Self::ENCODED_LEN];
28720        let mut buf = if avail_len < Self::ENCODED_LEN {
28721            payload_buf[0..avail_len].copy_from_slice(__input);
28722            Bytes::new(&payload_buf)
28723        } else {
28724            Bytes::new(__input)
28725        };
28726        let mut __struct = Self::default();
28727        __struct.q1 = buf.get_f32_le();
28728        __struct.q2 = buf.get_f32_le();
28729        __struct.q3 = buf.get_f32_le();
28730        __struct.q4 = buf.get_f32_le();
28731        __struct.roll = buf.get_f32_le();
28732        __struct.pitch = buf.get_f32_le();
28733        __struct.yaw = buf.get_f32_le();
28734        __struct.xacc = buf.get_f32_le();
28735        __struct.yacc = buf.get_f32_le();
28736        __struct.zacc = buf.get_f32_le();
28737        __struct.xgyro = buf.get_f32_le();
28738        __struct.ygyro = buf.get_f32_le();
28739        __struct.zgyro = buf.get_f32_le();
28740        __struct.lat = buf.get_f32_le();
28741        __struct.lon = buf.get_f32_le();
28742        __struct.alt = buf.get_f32_le();
28743        __struct.std_dev_horz = buf.get_f32_le();
28744        __struct.std_dev_vert = buf.get_f32_le();
28745        __struct.vn = buf.get_f32_le();
28746        __struct.ve = buf.get_f32_le();
28747        __struct.vd = buf.get_f32_le();
28748        __struct.lat_int = buf.get_i32_le();
28749        __struct.lon_int = buf.get_i32_le();
28750        Ok(__struct)
28751    }
28752    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28753        let mut __tmp = BytesMut::new(bytes);
28754        #[allow(clippy::absurd_extreme_comparisons)]
28755        #[allow(unused_comparisons)]
28756        if __tmp.remaining() < Self::ENCODED_LEN {
28757            panic!(
28758                "buffer is too small (need {} bytes, but got {})",
28759                Self::ENCODED_LEN,
28760                __tmp.remaining(),
28761            )
28762        }
28763        __tmp.put_f32_le(self.q1);
28764        __tmp.put_f32_le(self.q2);
28765        __tmp.put_f32_le(self.q3);
28766        __tmp.put_f32_le(self.q4);
28767        __tmp.put_f32_le(self.roll);
28768        __tmp.put_f32_le(self.pitch);
28769        __tmp.put_f32_le(self.yaw);
28770        __tmp.put_f32_le(self.xacc);
28771        __tmp.put_f32_le(self.yacc);
28772        __tmp.put_f32_le(self.zacc);
28773        __tmp.put_f32_le(self.xgyro);
28774        __tmp.put_f32_le(self.ygyro);
28775        __tmp.put_f32_le(self.zgyro);
28776        __tmp.put_f32_le(self.lat);
28777        __tmp.put_f32_le(self.lon);
28778        __tmp.put_f32_le(self.alt);
28779        __tmp.put_f32_le(self.std_dev_horz);
28780        __tmp.put_f32_le(self.std_dev_vert);
28781        __tmp.put_f32_le(self.vn);
28782        __tmp.put_f32_le(self.ve);
28783        __tmp.put_f32_le(self.vd);
28784        if matches!(version, MavlinkVersion::V2) {
28785            __tmp.put_i32_le(self.lat_int);
28786            __tmp.put_i32_le(self.lon_int);
28787            let len = __tmp.len();
28788            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28789        } else {
28790            __tmp.len()
28791        }
28792    }
28793}
28794#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
28795#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
28796#[doc = ""]
28797#[doc = "ID: 370"]
28798#[derive(Debug, Clone, PartialEq)]
28799#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28800#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28801#[cfg_attr(feature = "ts", derive(TS))]
28802#[cfg_attr(feature = "ts", ts(export))]
28803pub struct SMART_BATTERY_INFO_DATA {
28804    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
28805    pub capacity_full_specification: i32,
28806    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
28807    pub capacity_full: i32,
28808    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
28809    pub cycle_count: u16,
28810    #[doc = "Battery weight. 0: field not provided."]
28811    pub weight: u16,
28812    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
28813    pub discharge_minimum_voltage: u16,
28814    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
28815    pub charging_minimum_voltage: u16,
28816    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
28817    pub resting_minimum_voltage: u16,
28818    #[doc = "Battery ID"]
28819    pub id: u8,
28820    #[doc = "Function of the battery"]
28821    pub battery_function: MavBatteryFunction,
28822    #[doc = "Type (chemistry) of the battery"]
28823    pub mavtype: MavBatteryType,
28824    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
28825    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28826    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28827    pub serial_number: [u8; 16],
28828    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
28829    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28830    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28831    pub device_name: [u8; 50],
28832    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
28833    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28834    pub charging_maximum_voltage: u16,
28835    #[doc = "Number of battery cells in series. 0: field not provided."]
28836    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28837    pub cells_in_series: u8,
28838    #[doc = "Maximum pack discharge current. 0: field not provided."]
28839    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28840    pub discharge_maximum_current: u32,
28841    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
28842    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28843    pub discharge_maximum_burst_current: u32,
28844    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
28845    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28846    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28847    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28848    pub manufacture_date: [u8; 11],
28849}
28850impl SMART_BATTERY_INFO_DATA {
28851    pub const ENCODED_LEN: usize = 109usize;
28852    pub const DEFAULT: Self = Self {
28853        capacity_full_specification: 0_i32,
28854        capacity_full: 0_i32,
28855        cycle_count: 0_u16,
28856        weight: 0_u16,
28857        discharge_minimum_voltage: 0_u16,
28858        charging_minimum_voltage: 0_u16,
28859        resting_minimum_voltage: 0_u16,
28860        id: 0_u8,
28861        battery_function: MavBatteryFunction::DEFAULT,
28862        mavtype: MavBatteryType::DEFAULT,
28863        serial_number: [0_u8; 16usize],
28864        device_name: [0_u8; 50usize],
28865        charging_maximum_voltage: 0_u16,
28866        cells_in_series: 0_u8,
28867        discharge_maximum_current: 0_u32,
28868        discharge_maximum_burst_current: 0_u32,
28869        manufacture_date: [0_u8; 11usize],
28870    };
28871    #[cfg(feature = "arbitrary")]
28872    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28873        use arbitrary::{Arbitrary, Unstructured};
28874        let mut buf = [0u8; 1024];
28875        rng.fill_bytes(&mut buf);
28876        let mut unstructured = Unstructured::new(&buf);
28877        Self::arbitrary(&mut unstructured).unwrap_or_default()
28878    }
28879}
28880impl Default for SMART_BATTERY_INFO_DATA {
28881    fn default() -> Self {
28882        Self::DEFAULT.clone()
28883    }
28884}
28885impl MessageData for SMART_BATTERY_INFO_DATA {
28886    type Message = MavMessage;
28887    const ID: u32 = 370u32;
28888    const NAME: &'static str = "SMART_BATTERY_INFO";
28889    const EXTRA_CRC: u8 = 75u8;
28890    const ENCODED_LEN: usize = 109usize;
28891    fn deser(
28892        _version: MavlinkVersion,
28893        __input: &[u8],
28894    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28895        let avail_len = __input.len();
28896        let mut payload_buf = [0; Self::ENCODED_LEN];
28897        let mut buf = if avail_len < Self::ENCODED_LEN {
28898            payload_buf[0..avail_len].copy_from_slice(__input);
28899            Bytes::new(&payload_buf)
28900        } else {
28901            Bytes::new(__input)
28902        };
28903        let mut __struct = Self::default();
28904        __struct.capacity_full_specification = buf.get_i32_le();
28905        __struct.capacity_full = buf.get_i32_le();
28906        __struct.cycle_count = buf.get_u16_le();
28907        __struct.weight = buf.get_u16_le();
28908        __struct.discharge_minimum_voltage = buf.get_u16_le();
28909        __struct.charging_minimum_voltage = buf.get_u16_le();
28910        __struct.resting_minimum_voltage = buf.get_u16_le();
28911        __struct.id = buf.get_u8();
28912        let tmp = buf.get_u8();
28913        __struct.battery_function =
28914            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28915                enum_type: "MavBatteryFunction",
28916                value: tmp as u32,
28917            })?;
28918        let tmp = buf.get_u8();
28919        __struct.mavtype =
28920            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28921                enum_type: "MavBatteryType",
28922                value: tmp as u32,
28923            })?;
28924        for v in &mut __struct.serial_number {
28925            let val = buf.get_u8();
28926            *v = val;
28927        }
28928        for v in &mut __struct.device_name {
28929            let val = buf.get_u8();
28930            *v = val;
28931        }
28932        __struct.charging_maximum_voltage = buf.get_u16_le();
28933        __struct.cells_in_series = buf.get_u8();
28934        __struct.discharge_maximum_current = buf.get_u32_le();
28935        __struct.discharge_maximum_burst_current = buf.get_u32_le();
28936        for v in &mut __struct.manufacture_date {
28937            let val = buf.get_u8();
28938            *v = val;
28939        }
28940        Ok(__struct)
28941    }
28942    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28943        let mut __tmp = BytesMut::new(bytes);
28944        #[allow(clippy::absurd_extreme_comparisons)]
28945        #[allow(unused_comparisons)]
28946        if __tmp.remaining() < Self::ENCODED_LEN {
28947            panic!(
28948                "buffer is too small (need {} bytes, but got {})",
28949                Self::ENCODED_LEN,
28950                __tmp.remaining(),
28951            )
28952        }
28953        __tmp.put_i32_le(self.capacity_full_specification);
28954        __tmp.put_i32_le(self.capacity_full);
28955        __tmp.put_u16_le(self.cycle_count);
28956        __tmp.put_u16_le(self.weight);
28957        __tmp.put_u16_le(self.discharge_minimum_voltage);
28958        __tmp.put_u16_le(self.charging_minimum_voltage);
28959        __tmp.put_u16_le(self.resting_minimum_voltage);
28960        __tmp.put_u8(self.id);
28961        __tmp.put_u8(self.battery_function as u8);
28962        __tmp.put_u8(self.mavtype as u8);
28963        for val in &self.serial_number {
28964            __tmp.put_u8(*val);
28965        }
28966        for val in &self.device_name {
28967            __tmp.put_u8(*val);
28968        }
28969        if matches!(version, MavlinkVersion::V2) {
28970            __tmp.put_u16_le(self.charging_maximum_voltage);
28971            __tmp.put_u8(self.cells_in_series);
28972            __tmp.put_u32_le(self.discharge_maximum_current);
28973            __tmp.put_u32_le(self.discharge_maximum_burst_current);
28974            for val in &self.manufacture_date {
28975                __tmp.put_u8(*val);
28976            }
28977            let len = __tmp.len();
28978            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28979        } else {
28980            __tmp.len()
28981        }
28982    }
28983}
28984#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
28985#[doc = ""]
28986#[doc = "ID: 253"]
28987#[derive(Debug, Clone, PartialEq)]
28988#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28989#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28990#[cfg_attr(feature = "ts", derive(TS))]
28991#[cfg_attr(feature = "ts", ts(export))]
28992pub struct STATUSTEXT_DATA {
28993    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
28994    pub severity: MavSeverity,
28995    #[doc = "Status text message, without null termination character"]
28996    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28997    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28998    pub text: [u8; 50],
28999    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
29000    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29001    pub id: u16,
29002    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
29003    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29004    pub chunk_seq: u8,
29005}
29006impl STATUSTEXT_DATA {
29007    pub const ENCODED_LEN: usize = 54usize;
29008    pub const DEFAULT: Self = Self {
29009        severity: MavSeverity::DEFAULT,
29010        text: [0_u8; 50usize],
29011        id: 0_u16,
29012        chunk_seq: 0_u8,
29013    };
29014    #[cfg(feature = "arbitrary")]
29015    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29016        use arbitrary::{Arbitrary, Unstructured};
29017        let mut buf = [0u8; 1024];
29018        rng.fill_bytes(&mut buf);
29019        let mut unstructured = Unstructured::new(&buf);
29020        Self::arbitrary(&mut unstructured).unwrap_or_default()
29021    }
29022}
29023impl Default for STATUSTEXT_DATA {
29024    fn default() -> Self {
29025        Self::DEFAULT.clone()
29026    }
29027}
29028impl MessageData for STATUSTEXT_DATA {
29029    type Message = MavMessage;
29030    const ID: u32 = 253u32;
29031    const NAME: &'static str = "STATUSTEXT";
29032    const EXTRA_CRC: u8 = 83u8;
29033    const ENCODED_LEN: usize = 54usize;
29034    fn deser(
29035        _version: MavlinkVersion,
29036        __input: &[u8],
29037    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29038        let avail_len = __input.len();
29039        let mut payload_buf = [0; Self::ENCODED_LEN];
29040        let mut buf = if avail_len < Self::ENCODED_LEN {
29041            payload_buf[0..avail_len].copy_from_slice(__input);
29042            Bytes::new(&payload_buf)
29043        } else {
29044            Bytes::new(__input)
29045        };
29046        let mut __struct = Self::default();
29047        let tmp = buf.get_u8();
29048        __struct.severity =
29049            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29050                enum_type: "MavSeverity",
29051                value: tmp as u32,
29052            })?;
29053        for v in &mut __struct.text {
29054            let val = buf.get_u8();
29055            *v = val;
29056        }
29057        __struct.id = buf.get_u16_le();
29058        __struct.chunk_seq = buf.get_u8();
29059        Ok(__struct)
29060    }
29061    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29062        let mut __tmp = BytesMut::new(bytes);
29063        #[allow(clippy::absurd_extreme_comparisons)]
29064        #[allow(unused_comparisons)]
29065        if __tmp.remaining() < Self::ENCODED_LEN {
29066            panic!(
29067                "buffer is too small (need {} bytes, but got {})",
29068                Self::ENCODED_LEN,
29069                __tmp.remaining(),
29070            )
29071        }
29072        __tmp.put_u8(self.severity as u8);
29073        for val in &self.text {
29074            __tmp.put_u8(*val);
29075        }
29076        if matches!(version, MavlinkVersion::V2) {
29077            __tmp.put_u16_le(self.id);
29078            __tmp.put_u8(self.chunk_seq);
29079            let len = __tmp.len();
29080            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29081        } else {
29082            __tmp.len()
29083        }
29084    }
29085}
29086#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
29087#[doc = ""]
29088#[doc = "ID: 261"]
29089#[derive(Debug, Clone, PartialEq)]
29090#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29091#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29092#[cfg_attr(feature = "ts", derive(TS))]
29093#[cfg_attr(feature = "ts", ts(export))]
29094pub struct STORAGE_INFORMATION_DATA {
29095    #[doc = "Timestamp (time since system boot)."]
29096    pub time_boot_ms: u32,
29097    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29098    pub total_capacity: f32,
29099    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29100    pub used_capacity: f32,
29101    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29102    pub available_capacity: f32,
29103    #[doc = "Read speed."]
29104    pub read_speed: f32,
29105    #[doc = "Write speed."]
29106    pub write_speed: f32,
29107    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
29108    pub storage_id: u8,
29109    #[doc = "Number of storage devices"]
29110    pub storage_count: u8,
29111    #[doc = "Status of storage"]
29112    pub status: StorageStatus,
29113    #[doc = "Type of storage"]
29114    #[cfg_attr(feature = "serde", serde(default))]
29115    pub mavtype: StorageType,
29116    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
29117    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29118    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29119    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29120    pub name: [u8; 32],
29121    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
29122    #[cfg_attr(feature = "serde", serde(default))]
29123    pub storage_usage: StorageUsageFlag,
29124}
29125impl STORAGE_INFORMATION_DATA {
29126    pub const ENCODED_LEN: usize = 61usize;
29127    pub const DEFAULT: Self = Self {
29128        time_boot_ms: 0_u32,
29129        total_capacity: 0.0_f32,
29130        used_capacity: 0.0_f32,
29131        available_capacity: 0.0_f32,
29132        read_speed: 0.0_f32,
29133        write_speed: 0.0_f32,
29134        storage_id: 0_u8,
29135        storage_count: 0_u8,
29136        status: StorageStatus::DEFAULT,
29137        mavtype: StorageType::DEFAULT,
29138        name: [0_u8; 32usize],
29139        storage_usage: StorageUsageFlag::DEFAULT,
29140    };
29141    #[cfg(feature = "arbitrary")]
29142    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29143        use arbitrary::{Arbitrary, Unstructured};
29144        let mut buf = [0u8; 1024];
29145        rng.fill_bytes(&mut buf);
29146        let mut unstructured = Unstructured::new(&buf);
29147        Self::arbitrary(&mut unstructured).unwrap_or_default()
29148    }
29149}
29150impl Default for STORAGE_INFORMATION_DATA {
29151    fn default() -> Self {
29152        Self::DEFAULT.clone()
29153    }
29154}
29155impl MessageData for STORAGE_INFORMATION_DATA {
29156    type Message = MavMessage;
29157    const ID: u32 = 261u32;
29158    const NAME: &'static str = "STORAGE_INFORMATION";
29159    const EXTRA_CRC: u8 = 179u8;
29160    const ENCODED_LEN: usize = 61usize;
29161    fn deser(
29162        _version: MavlinkVersion,
29163        __input: &[u8],
29164    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29165        let avail_len = __input.len();
29166        let mut payload_buf = [0; Self::ENCODED_LEN];
29167        let mut buf = if avail_len < Self::ENCODED_LEN {
29168            payload_buf[0..avail_len].copy_from_slice(__input);
29169            Bytes::new(&payload_buf)
29170        } else {
29171            Bytes::new(__input)
29172        };
29173        let mut __struct = Self::default();
29174        __struct.time_boot_ms = buf.get_u32_le();
29175        __struct.total_capacity = buf.get_f32_le();
29176        __struct.used_capacity = buf.get_f32_le();
29177        __struct.available_capacity = buf.get_f32_le();
29178        __struct.read_speed = buf.get_f32_le();
29179        __struct.write_speed = buf.get_f32_le();
29180        __struct.storage_id = buf.get_u8();
29181        __struct.storage_count = buf.get_u8();
29182        let tmp = buf.get_u8();
29183        __struct.status =
29184            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29185                enum_type: "StorageStatus",
29186                value: tmp as u32,
29187            })?;
29188        let tmp = buf.get_u8();
29189        __struct.mavtype =
29190            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29191                enum_type: "StorageType",
29192                value: tmp as u32,
29193            })?;
29194        for v in &mut __struct.name {
29195            let val = buf.get_u8();
29196            *v = val;
29197        }
29198        let tmp = buf.get_u8();
29199        __struct.storage_usage = StorageUsageFlag::from_bits(tmp & StorageUsageFlag::all().bits())
29200            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29201                flag_type: "StorageUsageFlag",
29202                value: tmp as u32,
29203            })?;
29204        Ok(__struct)
29205    }
29206    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29207        let mut __tmp = BytesMut::new(bytes);
29208        #[allow(clippy::absurd_extreme_comparisons)]
29209        #[allow(unused_comparisons)]
29210        if __tmp.remaining() < Self::ENCODED_LEN {
29211            panic!(
29212                "buffer is too small (need {} bytes, but got {})",
29213                Self::ENCODED_LEN,
29214                __tmp.remaining(),
29215            )
29216        }
29217        __tmp.put_u32_le(self.time_boot_ms);
29218        __tmp.put_f32_le(self.total_capacity);
29219        __tmp.put_f32_le(self.used_capacity);
29220        __tmp.put_f32_le(self.available_capacity);
29221        __tmp.put_f32_le(self.read_speed);
29222        __tmp.put_f32_le(self.write_speed);
29223        __tmp.put_u8(self.storage_id);
29224        __tmp.put_u8(self.storage_count);
29225        __tmp.put_u8(self.status as u8);
29226        if matches!(version, MavlinkVersion::V2) {
29227            __tmp.put_u8(self.mavtype as u8);
29228            for val in &self.name {
29229                __tmp.put_u8(*val);
29230            }
29231            __tmp.put_u8(self.storage_usage.bits());
29232            let len = __tmp.len();
29233            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29234        } else {
29235            __tmp.len()
29236        }
29237    }
29238}
29239#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
29240#[doc = ""]
29241#[doc = "ID: 401"]
29242#[derive(Debug, Clone, PartialEq)]
29243#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29244#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29245#[cfg_attr(feature = "ts", derive(TS))]
29246#[cfg_attr(feature = "ts", ts(export))]
29247pub struct SUPPORTED_TUNES_DATA {
29248    #[doc = "Bitfield of supported tune formats."]
29249    pub format: TuneFormat,
29250    #[doc = "System ID"]
29251    pub target_system: u8,
29252    #[doc = "Component ID"]
29253    pub target_component: u8,
29254}
29255impl SUPPORTED_TUNES_DATA {
29256    pub const ENCODED_LEN: usize = 6usize;
29257    pub const DEFAULT: Self = Self {
29258        format: TuneFormat::DEFAULT,
29259        target_system: 0_u8,
29260        target_component: 0_u8,
29261    };
29262    #[cfg(feature = "arbitrary")]
29263    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29264        use arbitrary::{Arbitrary, Unstructured};
29265        let mut buf = [0u8; 1024];
29266        rng.fill_bytes(&mut buf);
29267        let mut unstructured = Unstructured::new(&buf);
29268        Self::arbitrary(&mut unstructured).unwrap_or_default()
29269    }
29270}
29271impl Default for SUPPORTED_TUNES_DATA {
29272    fn default() -> Self {
29273        Self::DEFAULT.clone()
29274    }
29275}
29276impl MessageData for SUPPORTED_TUNES_DATA {
29277    type Message = MavMessage;
29278    const ID: u32 = 401u32;
29279    const NAME: &'static str = "SUPPORTED_TUNES";
29280    const EXTRA_CRC: u8 = 183u8;
29281    const ENCODED_LEN: usize = 6usize;
29282    fn deser(
29283        _version: MavlinkVersion,
29284        __input: &[u8],
29285    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29286        let avail_len = __input.len();
29287        let mut payload_buf = [0; Self::ENCODED_LEN];
29288        let mut buf = if avail_len < Self::ENCODED_LEN {
29289            payload_buf[0..avail_len].copy_from_slice(__input);
29290            Bytes::new(&payload_buf)
29291        } else {
29292            Bytes::new(__input)
29293        };
29294        let mut __struct = Self::default();
29295        let tmp = buf.get_u32_le();
29296        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
29297            ::mavlink_core::error::ParserError::InvalidEnum {
29298                enum_type: "TuneFormat",
29299                value: tmp as u32,
29300            },
29301        )?;
29302        __struct.target_system = buf.get_u8();
29303        __struct.target_component = buf.get_u8();
29304        Ok(__struct)
29305    }
29306    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29307        let mut __tmp = BytesMut::new(bytes);
29308        #[allow(clippy::absurd_extreme_comparisons)]
29309        #[allow(unused_comparisons)]
29310        if __tmp.remaining() < Self::ENCODED_LEN {
29311            panic!(
29312                "buffer is too small (need {} bytes, but got {})",
29313                Self::ENCODED_LEN,
29314                __tmp.remaining(),
29315            )
29316        }
29317        __tmp.put_u32_le(self.format as u32);
29318        __tmp.put_u8(self.target_system);
29319        __tmp.put_u8(self.target_component);
29320        if matches!(version, MavlinkVersion::V2) {
29321            let len = __tmp.len();
29322            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29323        } else {
29324            __tmp.len()
29325        }
29326    }
29327}
29328#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
29329#[doc = ""]
29330#[doc = "ID: 2"]
29331#[derive(Debug, Clone, PartialEq)]
29332#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29333#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29334#[cfg_attr(feature = "ts", derive(TS))]
29335#[cfg_attr(feature = "ts", ts(export))]
29336pub struct SYSTEM_TIME_DATA {
29337    #[doc = "Timestamp (UNIX epoch time)."]
29338    pub time_unix_usec: u64,
29339    #[doc = "Timestamp (time since system boot)."]
29340    pub time_boot_ms: u32,
29341}
29342impl SYSTEM_TIME_DATA {
29343    pub const ENCODED_LEN: usize = 12usize;
29344    pub const DEFAULT: Self = Self {
29345        time_unix_usec: 0_u64,
29346        time_boot_ms: 0_u32,
29347    };
29348    #[cfg(feature = "arbitrary")]
29349    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29350        use arbitrary::{Arbitrary, Unstructured};
29351        let mut buf = [0u8; 1024];
29352        rng.fill_bytes(&mut buf);
29353        let mut unstructured = Unstructured::new(&buf);
29354        Self::arbitrary(&mut unstructured).unwrap_or_default()
29355    }
29356}
29357impl Default for SYSTEM_TIME_DATA {
29358    fn default() -> Self {
29359        Self::DEFAULT.clone()
29360    }
29361}
29362impl MessageData for SYSTEM_TIME_DATA {
29363    type Message = MavMessage;
29364    const ID: u32 = 2u32;
29365    const NAME: &'static str = "SYSTEM_TIME";
29366    const EXTRA_CRC: u8 = 137u8;
29367    const ENCODED_LEN: usize = 12usize;
29368    fn deser(
29369        _version: MavlinkVersion,
29370        __input: &[u8],
29371    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29372        let avail_len = __input.len();
29373        let mut payload_buf = [0; Self::ENCODED_LEN];
29374        let mut buf = if avail_len < Self::ENCODED_LEN {
29375            payload_buf[0..avail_len].copy_from_slice(__input);
29376            Bytes::new(&payload_buf)
29377        } else {
29378            Bytes::new(__input)
29379        };
29380        let mut __struct = Self::default();
29381        __struct.time_unix_usec = buf.get_u64_le();
29382        __struct.time_boot_ms = buf.get_u32_le();
29383        Ok(__struct)
29384    }
29385    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29386        let mut __tmp = BytesMut::new(bytes);
29387        #[allow(clippy::absurd_extreme_comparisons)]
29388        #[allow(unused_comparisons)]
29389        if __tmp.remaining() < Self::ENCODED_LEN {
29390            panic!(
29391                "buffer is too small (need {} bytes, but got {})",
29392                Self::ENCODED_LEN,
29393                __tmp.remaining(),
29394            )
29395        }
29396        __tmp.put_u64_le(self.time_unix_usec);
29397        __tmp.put_u32_le(self.time_boot_ms);
29398        if matches!(version, MavlinkVersion::V2) {
29399            let len = __tmp.len();
29400            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29401        } else {
29402            __tmp.len()
29403        }
29404    }
29405}
29406#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
29407#[doc = ""]
29408#[doc = "ID: 1"]
29409#[derive(Debug, Clone, PartialEq)]
29410#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29411#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29412#[cfg_attr(feature = "ts", derive(TS))]
29413#[cfg_attr(feature = "ts", ts(export))]
29414pub struct SYS_STATUS_DATA {
29415    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29416    pub onboard_control_sensors_present: MavSysStatusSensor,
29417    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29418    pub onboard_control_sensors_enabled: MavSysStatusSensor,
29419    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29420    pub onboard_control_sensors_health: MavSysStatusSensor,
29421    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
29422    pub load: u16,
29423    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
29424    pub voltage_battery: u16,
29425    #[doc = "Battery current, -1: Current not sent by autopilot"]
29426    pub current_battery: i16,
29427    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29428    pub drop_rate_comm: u16,
29429    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29430    pub errors_comm: u16,
29431    #[doc = "Autopilot-specific errors"]
29432    pub errors_count1: u16,
29433    #[doc = "Autopilot-specific errors"]
29434    pub errors_count2: u16,
29435    #[doc = "Autopilot-specific errors"]
29436    pub errors_count3: u16,
29437    #[doc = "Autopilot-specific errors"]
29438    pub errors_count4: u16,
29439    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
29440    pub battery_remaining: i8,
29441    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29442    #[cfg_attr(feature = "serde", serde(default))]
29443    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
29444    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29445    #[cfg_attr(feature = "serde", serde(default))]
29446    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
29447    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29448    #[cfg_attr(feature = "serde", serde(default))]
29449    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
29450}
29451impl SYS_STATUS_DATA {
29452    pub const ENCODED_LEN: usize = 43usize;
29453    pub const DEFAULT: Self = Self {
29454        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
29455        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
29456        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
29457        load: 0_u16,
29458        voltage_battery: 0_u16,
29459        current_battery: 0_i16,
29460        drop_rate_comm: 0_u16,
29461        errors_comm: 0_u16,
29462        errors_count1: 0_u16,
29463        errors_count2: 0_u16,
29464        errors_count3: 0_u16,
29465        errors_count4: 0_u16,
29466        battery_remaining: 0_i8,
29467        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
29468        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
29469        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
29470    };
29471    #[cfg(feature = "arbitrary")]
29472    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29473        use arbitrary::{Arbitrary, Unstructured};
29474        let mut buf = [0u8; 1024];
29475        rng.fill_bytes(&mut buf);
29476        let mut unstructured = Unstructured::new(&buf);
29477        Self::arbitrary(&mut unstructured).unwrap_or_default()
29478    }
29479}
29480impl Default for SYS_STATUS_DATA {
29481    fn default() -> Self {
29482        Self::DEFAULT.clone()
29483    }
29484}
29485impl MessageData for SYS_STATUS_DATA {
29486    type Message = MavMessage;
29487    const ID: u32 = 1u32;
29488    const NAME: &'static str = "SYS_STATUS";
29489    const EXTRA_CRC: u8 = 124u8;
29490    const ENCODED_LEN: usize = 43usize;
29491    fn deser(
29492        _version: MavlinkVersion,
29493        __input: &[u8],
29494    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29495        let avail_len = __input.len();
29496        let mut payload_buf = [0; Self::ENCODED_LEN];
29497        let mut buf = if avail_len < Self::ENCODED_LEN {
29498            payload_buf[0..avail_len].copy_from_slice(__input);
29499            Bytes::new(&payload_buf)
29500        } else {
29501            Bytes::new(__input)
29502        };
29503        let mut __struct = Self::default();
29504        let tmp = buf.get_u32_le();
29505        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
29506            tmp & MavSysStatusSensor::all().bits(),
29507        )
29508        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29509            flag_type: "MavSysStatusSensor",
29510            value: tmp as u32,
29511        })?;
29512        let tmp = buf.get_u32_le();
29513        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
29514            tmp & MavSysStatusSensor::all().bits(),
29515        )
29516        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29517            flag_type: "MavSysStatusSensor",
29518            value: tmp as u32,
29519        })?;
29520        let tmp = buf.get_u32_le();
29521        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
29522            tmp & MavSysStatusSensor::all().bits(),
29523        )
29524        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29525            flag_type: "MavSysStatusSensor",
29526            value: tmp as u32,
29527        })?;
29528        __struct.load = buf.get_u16_le();
29529        __struct.voltage_battery = buf.get_u16_le();
29530        __struct.current_battery = buf.get_i16_le();
29531        __struct.drop_rate_comm = buf.get_u16_le();
29532        __struct.errors_comm = buf.get_u16_le();
29533        __struct.errors_count1 = buf.get_u16_le();
29534        __struct.errors_count2 = buf.get_u16_le();
29535        __struct.errors_count3 = buf.get_u16_le();
29536        __struct.errors_count4 = buf.get_u16_le();
29537        __struct.battery_remaining = buf.get_i8();
29538        let tmp = buf.get_u32_le();
29539        __struct.onboard_control_sensors_present_extended =
29540            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
29541                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29542                flag_type: "MavSysStatusSensorExtended",
29543                value: tmp as u32,
29544            })?;
29545        let tmp = buf.get_u32_le();
29546        __struct.onboard_control_sensors_enabled_extended =
29547            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
29548                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29549                flag_type: "MavSysStatusSensorExtended",
29550                value: tmp as u32,
29551            })?;
29552        let tmp = buf.get_u32_le();
29553        __struct.onboard_control_sensors_health_extended =
29554            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
29555                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29556                flag_type: "MavSysStatusSensorExtended",
29557                value: tmp as u32,
29558            })?;
29559        Ok(__struct)
29560    }
29561    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29562        let mut __tmp = BytesMut::new(bytes);
29563        #[allow(clippy::absurd_extreme_comparisons)]
29564        #[allow(unused_comparisons)]
29565        if __tmp.remaining() < Self::ENCODED_LEN {
29566            panic!(
29567                "buffer is too small (need {} bytes, but got {})",
29568                Self::ENCODED_LEN,
29569                __tmp.remaining(),
29570            )
29571        }
29572        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
29573        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
29574        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
29575        __tmp.put_u16_le(self.load);
29576        __tmp.put_u16_le(self.voltage_battery);
29577        __tmp.put_i16_le(self.current_battery);
29578        __tmp.put_u16_le(self.drop_rate_comm);
29579        __tmp.put_u16_le(self.errors_comm);
29580        __tmp.put_u16_le(self.errors_count1);
29581        __tmp.put_u16_le(self.errors_count2);
29582        __tmp.put_u16_le(self.errors_count3);
29583        __tmp.put_u16_le(self.errors_count4);
29584        __tmp.put_i8(self.battery_remaining);
29585        if matches!(version, MavlinkVersion::V2) {
29586            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
29587            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
29588            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
29589            let len = __tmp.len();
29590            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29591        } else {
29592            __tmp.len()
29593        }
29594    }
29595}
29596#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
29597#[doc = ""]
29598#[doc = "ID: 135"]
29599#[derive(Debug, Clone, PartialEq)]
29600#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29601#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29602#[cfg_attr(feature = "ts", derive(TS))]
29603#[cfg_attr(feature = "ts", ts(export))]
29604pub struct TERRAIN_CHECK_DATA {
29605    #[doc = "Latitude"]
29606    pub lat: i32,
29607    #[doc = "Longitude"]
29608    pub lon: i32,
29609}
29610impl TERRAIN_CHECK_DATA {
29611    pub const ENCODED_LEN: usize = 8usize;
29612    pub const DEFAULT: Self = Self {
29613        lat: 0_i32,
29614        lon: 0_i32,
29615    };
29616    #[cfg(feature = "arbitrary")]
29617    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29618        use arbitrary::{Arbitrary, Unstructured};
29619        let mut buf = [0u8; 1024];
29620        rng.fill_bytes(&mut buf);
29621        let mut unstructured = Unstructured::new(&buf);
29622        Self::arbitrary(&mut unstructured).unwrap_or_default()
29623    }
29624}
29625impl Default for TERRAIN_CHECK_DATA {
29626    fn default() -> Self {
29627        Self::DEFAULT.clone()
29628    }
29629}
29630impl MessageData for TERRAIN_CHECK_DATA {
29631    type Message = MavMessage;
29632    const ID: u32 = 135u32;
29633    const NAME: &'static str = "TERRAIN_CHECK";
29634    const EXTRA_CRC: u8 = 203u8;
29635    const ENCODED_LEN: usize = 8usize;
29636    fn deser(
29637        _version: MavlinkVersion,
29638        __input: &[u8],
29639    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29640        let avail_len = __input.len();
29641        let mut payload_buf = [0; Self::ENCODED_LEN];
29642        let mut buf = if avail_len < Self::ENCODED_LEN {
29643            payload_buf[0..avail_len].copy_from_slice(__input);
29644            Bytes::new(&payload_buf)
29645        } else {
29646            Bytes::new(__input)
29647        };
29648        let mut __struct = Self::default();
29649        __struct.lat = buf.get_i32_le();
29650        __struct.lon = buf.get_i32_le();
29651        Ok(__struct)
29652    }
29653    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29654        let mut __tmp = BytesMut::new(bytes);
29655        #[allow(clippy::absurd_extreme_comparisons)]
29656        #[allow(unused_comparisons)]
29657        if __tmp.remaining() < Self::ENCODED_LEN {
29658            panic!(
29659                "buffer is too small (need {} bytes, but got {})",
29660                Self::ENCODED_LEN,
29661                __tmp.remaining(),
29662            )
29663        }
29664        __tmp.put_i32_le(self.lat);
29665        __tmp.put_i32_le(self.lon);
29666        if matches!(version, MavlinkVersion::V2) {
29667            let len = __tmp.len();
29668            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29669        } else {
29670            __tmp.len()
29671        }
29672    }
29673}
29674#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29675#[doc = ""]
29676#[doc = "ID: 134"]
29677#[derive(Debug, Clone, PartialEq)]
29678#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29679#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29680#[cfg_attr(feature = "ts", derive(TS))]
29681#[cfg_attr(feature = "ts", ts(export))]
29682pub struct TERRAIN_DATA_DATA {
29683    #[doc = "Latitude of SW corner of first grid"]
29684    pub lat: i32,
29685    #[doc = "Longitude of SW corner of first grid"]
29686    pub lon: i32,
29687    #[doc = "Grid spacing"]
29688    pub grid_spacing: u16,
29689    #[doc = "Terrain data MSL"]
29690    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29691    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29692    pub data: [i16; 16],
29693    #[doc = "bit within the terrain request mask"]
29694    pub gridbit: u8,
29695}
29696impl TERRAIN_DATA_DATA {
29697    pub const ENCODED_LEN: usize = 43usize;
29698    pub const DEFAULT: Self = Self {
29699        lat: 0_i32,
29700        lon: 0_i32,
29701        grid_spacing: 0_u16,
29702        data: [0_i16; 16usize],
29703        gridbit: 0_u8,
29704    };
29705    #[cfg(feature = "arbitrary")]
29706    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29707        use arbitrary::{Arbitrary, Unstructured};
29708        let mut buf = [0u8; 1024];
29709        rng.fill_bytes(&mut buf);
29710        let mut unstructured = Unstructured::new(&buf);
29711        Self::arbitrary(&mut unstructured).unwrap_or_default()
29712    }
29713}
29714impl Default for TERRAIN_DATA_DATA {
29715    fn default() -> Self {
29716        Self::DEFAULT.clone()
29717    }
29718}
29719impl MessageData for TERRAIN_DATA_DATA {
29720    type Message = MavMessage;
29721    const ID: u32 = 134u32;
29722    const NAME: &'static str = "TERRAIN_DATA";
29723    const EXTRA_CRC: u8 = 229u8;
29724    const ENCODED_LEN: usize = 43usize;
29725    fn deser(
29726        _version: MavlinkVersion,
29727        __input: &[u8],
29728    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29729        let avail_len = __input.len();
29730        let mut payload_buf = [0; Self::ENCODED_LEN];
29731        let mut buf = if avail_len < Self::ENCODED_LEN {
29732            payload_buf[0..avail_len].copy_from_slice(__input);
29733            Bytes::new(&payload_buf)
29734        } else {
29735            Bytes::new(__input)
29736        };
29737        let mut __struct = Self::default();
29738        __struct.lat = buf.get_i32_le();
29739        __struct.lon = buf.get_i32_le();
29740        __struct.grid_spacing = buf.get_u16_le();
29741        for v in &mut __struct.data {
29742            let val = buf.get_i16_le();
29743            *v = val;
29744        }
29745        __struct.gridbit = buf.get_u8();
29746        Ok(__struct)
29747    }
29748    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29749        let mut __tmp = BytesMut::new(bytes);
29750        #[allow(clippy::absurd_extreme_comparisons)]
29751        #[allow(unused_comparisons)]
29752        if __tmp.remaining() < Self::ENCODED_LEN {
29753            panic!(
29754                "buffer is too small (need {} bytes, but got {})",
29755                Self::ENCODED_LEN,
29756                __tmp.remaining(),
29757            )
29758        }
29759        __tmp.put_i32_le(self.lat);
29760        __tmp.put_i32_le(self.lon);
29761        __tmp.put_u16_le(self.grid_spacing);
29762        for val in &self.data {
29763            __tmp.put_i16_le(*val);
29764        }
29765        __tmp.put_u8(self.gridbit);
29766        if matches!(version, MavlinkVersion::V2) {
29767            let len = __tmp.len();
29768            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29769        } else {
29770            __tmp.len()
29771        }
29772    }
29773}
29774#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29775#[doc = ""]
29776#[doc = "ID: 136"]
29777#[derive(Debug, Clone, PartialEq)]
29778#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29779#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29780#[cfg_attr(feature = "ts", derive(TS))]
29781#[cfg_attr(feature = "ts", ts(export))]
29782pub struct TERRAIN_REPORT_DATA {
29783    #[doc = "Latitude"]
29784    pub lat: i32,
29785    #[doc = "Longitude"]
29786    pub lon: i32,
29787    #[doc = "Terrain height MSL"]
29788    pub terrain_height: f32,
29789    #[doc = "Current vehicle height above lat/lon terrain height"]
29790    pub current_height: f32,
29791    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
29792    pub spacing: u16,
29793    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
29794    pub pending: u16,
29795    #[doc = "Number of 4x4 terrain blocks in memory"]
29796    pub loaded: u16,
29797}
29798impl TERRAIN_REPORT_DATA {
29799    pub const ENCODED_LEN: usize = 22usize;
29800    pub const DEFAULT: Self = Self {
29801        lat: 0_i32,
29802        lon: 0_i32,
29803        terrain_height: 0.0_f32,
29804        current_height: 0.0_f32,
29805        spacing: 0_u16,
29806        pending: 0_u16,
29807        loaded: 0_u16,
29808    };
29809    #[cfg(feature = "arbitrary")]
29810    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29811        use arbitrary::{Arbitrary, Unstructured};
29812        let mut buf = [0u8; 1024];
29813        rng.fill_bytes(&mut buf);
29814        let mut unstructured = Unstructured::new(&buf);
29815        Self::arbitrary(&mut unstructured).unwrap_or_default()
29816    }
29817}
29818impl Default for TERRAIN_REPORT_DATA {
29819    fn default() -> Self {
29820        Self::DEFAULT.clone()
29821    }
29822}
29823impl MessageData for TERRAIN_REPORT_DATA {
29824    type Message = MavMessage;
29825    const ID: u32 = 136u32;
29826    const NAME: &'static str = "TERRAIN_REPORT";
29827    const EXTRA_CRC: u8 = 1u8;
29828    const ENCODED_LEN: usize = 22usize;
29829    fn deser(
29830        _version: MavlinkVersion,
29831        __input: &[u8],
29832    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29833        let avail_len = __input.len();
29834        let mut payload_buf = [0; Self::ENCODED_LEN];
29835        let mut buf = if avail_len < Self::ENCODED_LEN {
29836            payload_buf[0..avail_len].copy_from_slice(__input);
29837            Bytes::new(&payload_buf)
29838        } else {
29839            Bytes::new(__input)
29840        };
29841        let mut __struct = Self::default();
29842        __struct.lat = buf.get_i32_le();
29843        __struct.lon = buf.get_i32_le();
29844        __struct.terrain_height = buf.get_f32_le();
29845        __struct.current_height = buf.get_f32_le();
29846        __struct.spacing = buf.get_u16_le();
29847        __struct.pending = buf.get_u16_le();
29848        __struct.loaded = buf.get_u16_le();
29849        Ok(__struct)
29850    }
29851    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29852        let mut __tmp = BytesMut::new(bytes);
29853        #[allow(clippy::absurd_extreme_comparisons)]
29854        #[allow(unused_comparisons)]
29855        if __tmp.remaining() < Self::ENCODED_LEN {
29856            panic!(
29857                "buffer is too small (need {} bytes, but got {})",
29858                Self::ENCODED_LEN,
29859                __tmp.remaining(),
29860            )
29861        }
29862        __tmp.put_i32_le(self.lat);
29863        __tmp.put_i32_le(self.lon);
29864        __tmp.put_f32_le(self.terrain_height);
29865        __tmp.put_f32_le(self.current_height);
29866        __tmp.put_u16_le(self.spacing);
29867        __tmp.put_u16_le(self.pending);
29868        __tmp.put_u16_le(self.loaded);
29869        if matches!(version, MavlinkVersion::V2) {
29870            let len = __tmp.len();
29871            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29872        } else {
29873            __tmp.len()
29874        }
29875    }
29876}
29877#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29878#[doc = ""]
29879#[doc = "ID: 133"]
29880#[derive(Debug, Clone, PartialEq)]
29881#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29882#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29883#[cfg_attr(feature = "ts", derive(TS))]
29884#[cfg_attr(feature = "ts", ts(export))]
29885pub struct TERRAIN_REQUEST_DATA {
29886    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
29887    pub mask: u64,
29888    #[doc = "Latitude of SW corner of first grid"]
29889    pub lat: i32,
29890    #[doc = "Longitude of SW corner of first grid"]
29891    pub lon: i32,
29892    #[doc = "Grid spacing"]
29893    pub grid_spacing: u16,
29894}
29895impl TERRAIN_REQUEST_DATA {
29896    pub const ENCODED_LEN: usize = 18usize;
29897    pub const DEFAULT: Self = Self {
29898        mask: 0_u64,
29899        lat: 0_i32,
29900        lon: 0_i32,
29901        grid_spacing: 0_u16,
29902    };
29903    #[cfg(feature = "arbitrary")]
29904    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29905        use arbitrary::{Arbitrary, Unstructured};
29906        let mut buf = [0u8; 1024];
29907        rng.fill_bytes(&mut buf);
29908        let mut unstructured = Unstructured::new(&buf);
29909        Self::arbitrary(&mut unstructured).unwrap_or_default()
29910    }
29911}
29912impl Default for TERRAIN_REQUEST_DATA {
29913    fn default() -> Self {
29914        Self::DEFAULT.clone()
29915    }
29916}
29917impl MessageData for TERRAIN_REQUEST_DATA {
29918    type Message = MavMessage;
29919    const ID: u32 = 133u32;
29920    const NAME: &'static str = "TERRAIN_REQUEST";
29921    const EXTRA_CRC: u8 = 6u8;
29922    const ENCODED_LEN: usize = 18usize;
29923    fn deser(
29924        _version: MavlinkVersion,
29925        __input: &[u8],
29926    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29927        let avail_len = __input.len();
29928        let mut payload_buf = [0; Self::ENCODED_LEN];
29929        let mut buf = if avail_len < Self::ENCODED_LEN {
29930            payload_buf[0..avail_len].copy_from_slice(__input);
29931            Bytes::new(&payload_buf)
29932        } else {
29933            Bytes::new(__input)
29934        };
29935        let mut __struct = Self::default();
29936        __struct.mask = buf.get_u64_le();
29937        __struct.lat = buf.get_i32_le();
29938        __struct.lon = buf.get_i32_le();
29939        __struct.grid_spacing = buf.get_u16_le();
29940        Ok(__struct)
29941    }
29942    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29943        let mut __tmp = BytesMut::new(bytes);
29944        #[allow(clippy::absurd_extreme_comparisons)]
29945        #[allow(unused_comparisons)]
29946        if __tmp.remaining() < Self::ENCODED_LEN {
29947            panic!(
29948                "buffer is too small (need {} bytes, but got {})",
29949                Self::ENCODED_LEN,
29950                __tmp.remaining(),
29951            )
29952        }
29953        __tmp.put_u64_le(self.mask);
29954        __tmp.put_i32_le(self.lat);
29955        __tmp.put_i32_le(self.lon);
29956        __tmp.put_u16_le(self.grid_spacing);
29957        if matches!(version, MavlinkVersion::V2) {
29958            let len = __tmp.len();
29959            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29960        } else {
29961            __tmp.len()
29962        }
29963    }
29964}
29965#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
29966#[doc = ""]
29967#[doc = "ID: 111"]
29968#[derive(Debug, Clone, PartialEq)]
29969#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29970#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29971#[cfg_attr(feature = "ts", derive(TS))]
29972#[cfg_attr(feature = "ts", ts(export))]
29973pub struct TIMESYNC_DATA {
29974    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
29975    pub tc1: i64,
29976    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
29977    pub ts1: i64,
29978    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
29979    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29980    pub target_system: u8,
29981    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
29982    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29983    pub target_component: u8,
29984}
29985impl TIMESYNC_DATA {
29986    pub const ENCODED_LEN: usize = 18usize;
29987    pub const DEFAULT: Self = Self {
29988        tc1: 0_i64,
29989        ts1: 0_i64,
29990        target_system: 0_u8,
29991        target_component: 0_u8,
29992    };
29993    #[cfg(feature = "arbitrary")]
29994    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29995        use arbitrary::{Arbitrary, Unstructured};
29996        let mut buf = [0u8; 1024];
29997        rng.fill_bytes(&mut buf);
29998        let mut unstructured = Unstructured::new(&buf);
29999        Self::arbitrary(&mut unstructured).unwrap_or_default()
30000    }
30001}
30002impl Default for TIMESYNC_DATA {
30003    fn default() -> Self {
30004        Self::DEFAULT.clone()
30005    }
30006}
30007impl MessageData for TIMESYNC_DATA {
30008    type Message = MavMessage;
30009    const ID: u32 = 111u32;
30010    const NAME: &'static str = "TIMESYNC";
30011    const EXTRA_CRC: u8 = 34u8;
30012    const ENCODED_LEN: usize = 18usize;
30013    fn deser(
30014        _version: MavlinkVersion,
30015        __input: &[u8],
30016    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30017        let avail_len = __input.len();
30018        let mut payload_buf = [0; Self::ENCODED_LEN];
30019        let mut buf = if avail_len < Self::ENCODED_LEN {
30020            payload_buf[0..avail_len].copy_from_slice(__input);
30021            Bytes::new(&payload_buf)
30022        } else {
30023            Bytes::new(__input)
30024        };
30025        let mut __struct = Self::default();
30026        __struct.tc1 = buf.get_i64_le();
30027        __struct.ts1 = buf.get_i64_le();
30028        __struct.target_system = buf.get_u8();
30029        __struct.target_component = buf.get_u8();
30030        Ok(__struct)
30031    }
30032    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30033        let mut __tmp = BytesMut::new(bytes);
30034        #[allow(clippy::absurd_extreme_comparisons)]
30035        #[allow(unused_comparisons)]
30036        if __tmp.remaining() < Self::ENCODED_LEN {
30037            panic!(
30038                "buffer is too small (need {} bytes, but got {})",
30039                Self::ENCODED_LEN,
30040                __tmp.remaining(),
30041            )
30042        }
30043        __tmp.put_i64_le(self.tc1);
30044        __tmp.put_i64_le(self.ts1);
30045        if matches!(version, MavlinkVersion::V2) {
30046            __tmp.put_u8(self.target_system);
30047            __tmp.put_u8(self.target_component);
30048            let len = __tmp.len();
30049            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30050        } else {
30051            __tmp.len()
30052        }
30053    }
30054}
30055#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
30056#[doc = ""]
30057#[doc = "ID: 380"]
30058#[derive(Debug, Clone, PartialEq)]
30059#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30060#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30061#[cfg_attr(feature = "ts", derive(TS))]
30062#[cfg_attr(feature = "ts", ts(export))]
30063pub struct TIME_ESTIMATE_TO_TARGET_DATA {
30064    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
30065    pub safe_return: i32,
30066    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
30067    pub land: i32,
30068    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
30069    pub mission_next_item: i32,
30070    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
30071    pub mission_end: i32,
30072    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
30073    pub commanded_action: i32,
30074}
30075impl TIME_ESTIMATE_TO_TARGET_DATA {
30076    pub const ENCODED_LEN: usize = 20usize;
30077    pub const DEFAULT: Self = Self {
30078        safe_return: 0_i32,
30079        land: 0_i32,
30080        mission_next_item: 0_i32,
30081        mission_end: 0_i32,
30082        commanded_action: 0_i32,
30083    };
30084    #[cfg(feature = "arbitrary")]
30085    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30086        use arbitrary::{Arbitrary, Unstructured};
30087        let mut buf = [0u8; 1024];
30088        rng.fill_bytes(&mut buf);
30089        let mut unstructured = Unstructured::new(&buf);
30090        Self::arbitrary(&mut unstructured).unwrap_or_default()
30091    }
30092}
30093impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
30094    fn default() -> Self {
30095        Self::DEFAULT.clone()
30096    }
30097}
30098impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
30099    type Message = MavMessage;
30100    const ID: u32 = 380u32;
30101    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
30102    const EXTRA_CRC: u8 = 232u8;
30103    const ENCODED_LEN: usize = 20usize;
30104    fn deser(
30105        _version: MavlinkVersion,
30106        __input: &[u8],
30107    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30108        let avail_len = __input.len();
30109        let mut payload_buf = [0; Self::ENCODED_LEN];
30110        let mut buf = if avail_len < Self::ENCODED_LEN {
30111            payload_buf[0..avail_len].copy_from_slice(__input);
30112            Bytes::new(&payload_buf)
30113        } else {
30114            Bytes::new(__input)
30115        };
30116        let mut __struct = Self::default();
30117        __struct.safe_return = buf.get_i32_le();
30118        __struct.land = buf.get_i32_le();
30119        __struct.mission_next_item = buf.get_i32_le();
30120        __struct.mission_end = buf.get_i32_le();
30121        __struct.commanded_action = buf.get_i32_le();
30122        Ok(__struct)
30123    }
30124    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30125        let mut __tmp = BytesMut::new(bytes);
30126        #[allow(clippy::absurd_extreme_comparisons)]
30127        #[allow(unused_comparisons)]
30128        if __tmp.remaining() < Self::ENCODED_LEN {
30129            panic!(
30130                "buffer is too small (need {} bytes, but got {})",
30131                Self::ENCODED_LEN,
30132                __tmp.remaining(),
30133            )
30134        }
30135        __tmp.put_i32_le(self.safe_return);
30136        __tmp.put_i32_le(self.land);
30137        __tmp.put_i32_le(self.mission_next_item);
30138        __tmp.put_i32_le(self.mission_end);
30139        __tmp.put_i32_le(self.commanded_action);
30140        if matches!(version, MavlinkVersion::V2) {
30141            let len = __tmp.len();
30142            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30143        } else {
30144            __tmp.len()
30145        }
30146    }
30147}
30148#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
30149#[doc = ""]
30150#[doc = "ID: 333"]
30151#[derive(Debug, Clone, PartialEq)]
30152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30153#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30154#[cfg_attr(feature = "ts", derive(TS))]
30155#[cfg_attr(feature = "ts", ts(export))]
30156pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30157    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30158    pub time_usec: u64,
30159    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
30160    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30161    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30162    pub pos_x: [f32; 5],
30163    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
30164    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30165    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30166    pub pos_y: [f32; 5],
30167    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
30168    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30169    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30170    pub pos_z: [f32; 5],
30171    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
30172    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30173    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30174    pub delta: [f32; 5],
30175    #[doc = "Yaw. Set to NaN for unchanged"]
30176    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30177    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30178    pub pos_yaw: [f32; 5],
30179    #[doc = "Number of valid control points (up-to 5 points are possible)"]
30180    pub valid_points: u8,
30181}
30182impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30183    pub const ENCODED_LEN: usize = 109usize;
30184    pub const DEFAULT: Self = Self {
30185        time_usec: 0_u64,
30186        pos_x: [0.0_f32; 5usize],
30187        pos_y: [0.0_f32; 5usize],
30188        pos_z: [0.0_f32; 5usize],
30189        delta: [0.0_f32; 5usize],
30190        pos_yaw: [0.0_f32; 5usize],
30191        valid_points: 0_u8,
30192    };
30193    #[cfg(feature = "arbitrary")]
30194    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30195        use arbitrary::{Arbitrary, Unstructured};
30196        let mut buf = [0u8; 1024];
30197        rng.fill_bytes(&mut buf);
30198        let mut unstructured = Unstructured::new(&buf);
30199        Self::arbitrary(&mut unstructured).unwrap_or_default()
30200    }
30201}
30202impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30203    fn default() -> Self {
30204        Self::DEFAULT.clone()
30205    }
30206}
30207impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30208    type Message = MavMessage;
30209    const ID: u32 = 333u32;
30210    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
30211    const EXTRA_CRC: u8 = 231u8;
30212    const ENCODED_LEN: usize = 109usize;
30213    fn deser(
30214        _version: MavlinkVersion,
30215        __input: &[u8],
30216    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30217        let avail_len = __input.len();
30218        let mut payload_buf = [0; Self::ENCODED_LEN];
30219        let mut buf = if avail_len < Self::ENCODED_LEN {
30220            payload_buf[0..avail_len].copy_from_slice(__input);
30221            Bytes::new(&payload_buf)
30222        } else {
30223            Bytes::new(__input)
30224        };
30225        let mut __struct = Self::default();
30226        __struct.time_usec = buf.get_u64_le();
30227        for v in &mut __struct.pos_x {
30228            let val = buf.get_f32_le();
30229            *v = val;
30230        }
30231        for v in &mut __struct.pos_y {
30232            let val = buf.get_f32_le();
30233            *v = val;
30234        }
30235        for v in &mut __struct.pos_z {
30236            let val = buf.get_f32_le();
30237            *v = val;
30238        }
30239        for v in &mut __struct.delta {
30240            let val = buf.get_f32_le();
30241            *v = val;
30242        }
30243        for v in &mut __struct.pos_yaw {
30244            let val = buf.get_f32_le();
30245            *v = val;
30246        }
30247        __struct.valid_points = buf.get_u8();
30248        Ok(__struct)
30249    }
30250    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30251        let mut __tmp = BytesMut::new(bytes);
30252        #[allow(clippy::absurd_extreme_comparisons)]
30253        #[allow(unused_comparisons)]
30254        if __tmp.remaining() < Self::ENCODED_LEN {
30255            panic!(
30256                "buffer is too small (need {} bytes, but got {})",
30257                Self::ENCODED_LEN,
30258                __tmp.remaining(),
30259            )
30260        }
30261        __tmp.put_u64_le(self.time_usec);
30262        for val in &self.pos_x {
30263            __tmp.put_f32_le(*val);
30264        }
30265        for val in &self.pos_y {
30266            __tmp.put_f32_le(*val);
30267        }
30268        for val in &self.pos_z {
30269            __tmp.put_f32_le(*val);
30270        }
30271        for val in &self.delta {
30272            __tmp.put_f32_le(*val);
30273        }
30274        for val in &self.pos_yaw {
30275            __tmp.put_f32_le(*val);
30276        }
30277        __tmp.put_u8(self.valid_points);
30278        if matches!(version, MavlinkVersion::V2) {
30279            let len = __tmp.len();
30280            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30281        } else {
30282            __tmp.len()
30283        }
30284    }
30285}
30286#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
30287#[doc = ""]
30288#[doc = "ID: 332"]
30289#[derive(Debug, Clone, PartialEq)]
30290#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30292#[cfg_attr(feature = "ts", derive(TS))]
30293#[cfg_attr(feature = "ts", ts(export))]
30294pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30295    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30296    pub time_usec: u64,
30297    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
30298    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30299    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30300    pub pos_x: [f32; 5],
30301    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
30302    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30303    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30304    pub pos_y: [f32; 5],
30305    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
30306    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30307    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30308    pub pos_z: [f32; 5],
30309    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
30310    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30311    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30312    pub vel_x: [f32; 5],
30313    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
30314    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30315    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30316    pub vel_y: [f32; 5],
30317    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
30318    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30319    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30320    pub vel_z: [f32; 5],
30321    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
30322    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30323    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30324    pub acc_x: [f32; 5],
30325    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
30326    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30327    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30328    pub acc_y: [f32; 5],
30329    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
30330    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30331    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30332    pub acc_z: [f32; 5],
30333    #[doc = "Yaw angle, set to NaN if not being used"]
30334    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30335    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30336    pub pos_yaw: [f32; 5],
30337    #[doc = "Yaw rate, set to NaN if not being used"]
30338    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30339    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30340    pub vel_yaw: [f32; 5],
30341    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
30342    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30343    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30344    pub command: [u16; 5],
30345    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
30346    pub valid_points: u8,
30347}
30348impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30349    pub const ENCODED_LEN: usize = 239usize;
30350    pub const DEFAULT: Self = Self {
30351        time_usec: 0_u64,
30352        pos_x: [0.0_f32; 5usize],
30353        pos_y: [0.0_f32; 5usize],
30354        pos_z: [0.0_f32; 5usize],
30355        vel_x: [0.0_f32; 5usize],
30356        vel_y: [0.0_f32; 5usize],
30357        vel_z: [0.0_f32; 5usize],
30358        acc_x: [0.0_f32; 5usize],
30359        acc_y: [0.0_f32; 5usize],
30360        acc_z: [0.0_f32; 5usize],
30361        pos_yaw: [0.0_f32; 5usize],
30362        vel_yaw: [0.0_f32; 5usize],
30363        command: [0_u16; 5usize],
30364        valid_points: 0_u8,
30365    };
30366    #[cfg(feature = "arbitrary")]
30367    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30368        use arbitrary::{Arbitrary, Unstructured};
30369        let mut buf = [0u8; 1024];
30370        rng.fill_bytes(&mut buf);
30371        let mut unstructured = Unstructured::new(&buf);
30372        Self::arbitrary(&mut unstructured).unwrap_or_default()
30373    }
30374}
30375impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30376    fn default() -> Self {
30377        Self::DEFAULT.clone()
30378    }
30379}
30380impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30381    type Message = MavMessage;
30382    const ID: u32 = 332u32;
30383    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
30384    const EXTRA_CRC: u8 = 236u8;
30385    const ENCODED_LEN: usize = 239usize;
30386    fn deser(
30387        _version: MavlinkVersion,
30388        __input: &[u8],
30389    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30390        let avail_len = __input.len();
30391        let mut payload_buf = [0; Self::ENCODED_LEN];
30392        let mut buf = if avail_len < Self::ENCODED_LEN {
30393            payload_buf[0..avail_len].copy_from_slice(__input);
30394            Bytes::new(&payload_buf)
30395        } else {
30396            Bytes::new(__input)
30397        };
30398        let mut __struct = Self::default();
30399        __struct.time_usec = buf.get_u64_le();
30400        for v in &mut __struct.pos_x {
30401            let val = buf.get_f32_le();
30402            *v = val;
30403        }
30404        for v in &mut __struct.pos_y {
30405            let val = buf.get_f32_le();
30406            *v = val;
30407        }
30408        for v in &mut __struct.pos_z {
30409            let val = buf.get_f32_le();
30410            *v = val;
30411        }
30412        for v in &mut __struct.vel_x {
30413            let val = buf.get_f32_le();
30414            *v = val;
30415        }
30416        for v in &mut __struct.vel_y {
30417            let val = buf.get_f32_le();
30418            *v = val;
30419        }
30420        for v in &mut __struct.vel_z {
30421            let val = buf.get_f32_le();
30422            *v = val;
30423        }
30424        for v in &mut __struct.acc_x {
30425            let val = buf.get_f32_le();
30426            *v = val;
30427        }
30428        for v in &mut __struct.acc_y {
30429            let val = buf.get_f32_le();
30430            *v = val;
30431        }
30432        for v in &mut __struct.acc_z {
30433            let val = buf.get_f32_le();
30434            *v = val;
30435        }
30436        for v in &mut __struct.pos_yaw {
30437            let val = buf.get_f32_le();
30438            *v = val;
30439        }
30440        for v in &mut __struct.vel_yaw {
30441            let val = buf.get_f32_le();
30442            *v = val;
30443        }
30444        for v in &mut __struct.command {
30445            let val = buf.get_u16_le();
30446            *v = val;
30447        }
30448        __struct.valid_points = buf.get_u8();
30449        Ok(__struct)
30450    }
30451    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30452        let mut __tmp = BytesMut::new(bytes);
30453        #[allow(clippy::absurd_extreme_comparisons)]
30454        #[allow(unused_comparisons)]
30455        if __tmp.remaining() < Self::ENCODED_LEN {
30456            panic!(
30457                "buffer is too small (need {} bytes, but got {})",
30458                Self::ENCODED_LEN,
30459                __tmp.remaining(),
30460            )
30461        }
30462        __tmp.put_u64_le(self.time_usec);
30463        for val in &self.pos_x {
30464            __tmp.put_f32_le(*val);
30465        }
30466        for val in &self.pos_y {
30467            __tmp.put_f32_le(*val);
30468        }
30469        for val in &self.pos_z {
30470            __tmp.put_f32_le(*val);
30471        }
30472        for val in &self.vel_x {
30473            __tmp.put_f32_le(*val);
30474        }
30475        for val in &self.vel_y {
30476            __tmp.put_f32_le(*val);
30477        }
30478        for val in &self.vel_z {
30479            __tmp.put_f32_le(*val);
30480        }
30481        for val in &self.acc_x {
30482            __tmp.put_f32_le(*val);
30483        }
30484        for val in &self.acc_y {
30485            __tmp.put_f32_le(*val);
30486        }
30487        for val in &self.acc_z {
30488            __tmp.put_f32_le(*val);
30489        }
30490        for val in &self.pos_yaw {
30491            __tmp.put_f32_le(*val);
30492        }
30493        for val in &self.vel_yaw {
30494            __tmp.put_f32_le(*val);
30495        }
30496        for val in &self.command {
30497            __tmp.put_u16_le(*val);
30498        }
30499        __tmp.put_u8(self.valid_points);
30500        if matches!(version, MavlinkVersion::V2) {
30501            let len = __tmp.len();
30502            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30503        } else {
30504            __tmp.len()
30505        }
30506    }
30507}
30508#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
30509#[doc = ""]
30510#[doc = "ID: 385"]
30511#[derive(Debug, Clone, PartialEq)]
30512#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30513#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30514#[cfg_attr(feature = "ts", derive(TS))]
30515#[cfg_attr(feature = "ts", ts(export))]
30516pub struct TUNNEL_DATA {
30517    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
30518    pub payload_type: MavTunnelPayloadType,
30519    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
30520    pub target_system: u8,
30521    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
30522    pub target_component: u8,
30523    #[doc = "Length of the data transported in payload"]
30524    pub payload_length: u8,
30525    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
30526    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30527    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30528    pub payload: [u8; 128],
30529}
30530impl TUNNEL_DATA {
30531    pub const ENCODED_LEN: usize = 133usize;
30532    pub const DEFAULT: Self = Self {
30533        payload_type: MavTunnelPayloadType::DEFAULT,
30534        target_system: 0_u8,
30535        target_component: 0_u8,
30536        payload_length: 0_u8,
30537        payload: [0_u8; 128usize],
30538    };
30539    #[cfg(feature = "arbitrary")]
30540    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30541        use arbitrary::{Arbitrary, Unstructured};
30542        let mut buf = [0u8; 1024];
30543        rng.fill_bytes(&mut buf);
30544        let mut unstructured = Unstructured::new(&buf);
30545        Self::arbitrary(&mut unstructured).unwrap_or_default()
30546    }
30547}
30548impl Default for TUNNEL_DATA {
30549    fn default() -> Self {
30550        Self::DEFAULT.clone()
30551    }
30552}
30553impl MessageData for TUNNEL_DATA {
30554    type Message = MavMessage;
30555    const ID: u32 = 385u32;
30556    const NAME: &'static str = "TUNNEL";
30557    const EXTRA_CRC: u8 = 147u8;
30558    const ENCODED_LEN: usize = 133usize;
30559    fn deser(
30560        _version: MavlinkVersion,
30561        __input: &[u8],
30562    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30563        let avail_len = __input.len();
30564        let mut payload_buf = [0; Self::ENCODED_LEN];
30565        let mut buf = if avail_len < Self::ENCODED_LEN {
30566            payload_buf[0..avail_len].copy_from_slice(__input);
30567            Bytes::new(&payload_buf)
30568        } else {
30569            Bytes::new(__input)
30570        };
30571        let mut __struct = Self::default();
30572        let tmp = buf.get_u16_le();
30573        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
30574            ::mavlink_core::error::ParserError::InvalidEnum {
30575                enum_type: "MavTunnelPayloadType",
30576                value: tmp as u32,
30577            },
30578        )?;
30579        __struct.target_system = buf.get_u8();
30580        __struct.target_component = buf.get_u8();
30581        __struct.payload_length = buf.get_u8();
30582        for v in &mut __struct.payload {
30583            let val = buf.get_u8();
30584            *v = val;
30585        }
30586        Ok(__struct)
30587    }
30588    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30589        let mut __tmp = BytesMut::new(bytes);
30590        #[allow(clippy::absurd_extreme_comparisons)]
30591        #[allow(unused_comparisons)]
30592        if __tmp.remaining() < Self::ENCODED_LEN {
30593            panic!(
30594                "buffer is too small (need {} bytes, but got {})",
30595                Self::ENCODED_LEN,
30596                __tmp.remaining(),
30597            )
30598        }
30599        __tmp.put_u16_le(self.payload_type as u16);
30600        __tmp.put_u8(self.target_system);
30601        __tmp.put_u8(self.target_component);
30602        __tmp.put_u8(self.payload_length);
30603        for val in &self.payload {
30604            __tmp.put_u8(*val);
30605        }
30606        if matches!(version, MavlinkVersion::V2) {
30607            let len = __tmp.len();
30608            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30609        } else {
30610            __tmp.len()
30611        }
30612    }
30613}
30614#[doc = "System status specific to ualberta uav."]
30615#[doc = ""]
30616#[doc = "ID: 222"]
30617#[derive(Debug, Clone, PartialEq)]
30618#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30619#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30620#[cfg_attr(feature = "ts", derive(TS))]
30621#[cfg_attr(feature = "ts", ts(export))]
30622pub struct UALBERTA_SYS_STATUS_DATA {
30623    #[doc = "System mode, see UALBERTA_AUTOPILOT_MODE ENUM"]
30624    pub mode: u8,
30625    #[doc = "Navigation mode, see UALBERTA_NAV_MODE ENUM"]
30626    pub nav_mode: u8,
30627    #[doc = "Pilot mode, see UALBERTA_PILOT_MODE"]
30628    pub pilot: u8,
30629}
30630impl UALBERTA_SYS_STATUS_DATA {
30631    pub const ENCODED_LEN: usize = 3usize;
30632    pub const DEFAULT: Self = Self {
30633        mode: 0_u8,
30634        nav_mode: 0_u8,
30635        pilot: 0_u8,
30636    };
30637    #[cfg(feature = "arbitrary")]
30638    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30639        use arbitrary::{Arbitrary, Unstructured};
30640        let mut buf = [0u8; 1024];
30641        rng.fill_bytes(&mut buf);
30642        let mut unstructured = Unstructured::new(&buf);
30643        Self::arbitrary(&mut unstructured).unwrap_or_default()
30644    }
30645}
30646impl Default for UALBERTA_SYS_STATUS_DATA {
30647    fn default() -> Self {
30648        Self::DEFAULT.clone()
30649    }
30650}
30651impl MessageData for UALBERTA_SYS_STATUS_DATA {
30652    type Message = MavMessage;
30653    const ID: u32 = 222u32;
30654    const NAME: &'static str = "UALBERTA_SYS_STATUS";
30655    const EXTRA_CRC: u8 = 15u8;
30656    const ENCODED_LEN: usize = 3usize;
30657    fn deser(
30658        _version: MavlinkVersion,
30659        __input: &[u8],
30660    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30661        let avail_len = __input.len();
30662        let mut payload_buf = [0; Self::ENCODED_LEN];
30663        let mut buf = if avail_len < Self::ENCODED_LEN {
30664            payload_buf[0..avail_len].copy_from_slice(__input);
30665            Bytes::new(&payload_buf)
30666        } else {
30667            Bytes::new(__input)
30668        };
30669        let mut __struct = Self::default();
30670        __struct.mode = buf.get_u8();
30671        __struct.nav_mode = buf.get_u8();
30672        __struct.pilot = buf.get_u8();
30673        Ok(__struct)
30674    }
30675    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30676        let mut __tmp = BytesMut::new(bytes);
30677        #[allow(clippy::absurd_extreme_comparisons)]
30678        #[allow(unused_comparisons)]
30679        if __tmp.remaining() < Self::ENCODED_LEN {
30680            panic!(
30681                "buffer is too small (need {} bytes, but got {})",
30682                Self::ENCODED_LEN,
30683                __tmp.remaining(),
30684            )
30685        }
30686        __tmp.put_u8(self.mode);
30687        __tmp.put_u8(self.nav_mode);
30688        __tmp.put_u8(self.pilot);
30689        if matches!(version, MavlinkVersion::V2) {
30690            let len = __tmp.len();
30691            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30692        } else {
30693            __tmp.len()
30694        }
30695    }
30696}
30697#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
30698#[doc = ""]
30699#[doc = "ID: 311"]
30700#[derive(Debug, Clone, PartialEq)]
30701#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30702#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30703#[cfg_attr(feature = "ts", derive(TS))]
30704#[cfg_attr(feature = "ts", ts(export))]
30705pub struct UAVCAN_NODE_INFO_DATA {
30706    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30707    pub time_usec: u64,
30708    #[doc = "Time since the start-up of the node."]
30709    pub uptime_sec: u32,
30710    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
30711    pub sw_vcs_commit: u32,
30712    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
30713    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30714    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30715    pub name: [u8; 80],
30716    #[doc = "Hardware major version number."]
30717    pub hw_version_major: u8,
30718    #[doc = "Hardware minor version number."]
30719    pub hw_version_minor: u8,
30720    #[doc = "Hardware unique 128-bit ID."]
30721    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30722    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30723    pub hw_unique_id: [u8; 16],
30724    #[doc = "Software major version number."]
30725    pub sw_version_major: u8,
30726    #[doc = "Software minor version number."]
30727    pub sw_version_minor: u8,
30728}
30729impl UAVCAN_NODE_INFO_DATA {
30730    pub const ENCODED_LEN: usize = 116usize;
30731    pub const DEFAULT: Self = Self {
30732        time_usec: 0_u64,
30733        uptime_sec: 0_u32,
30734        sw_vcs_commit: 0_u32,
30735        name: [0_u8; 80usize],
30736        hw_version_major: 0_u8,
30737        hw_version_minor: 0_u8,
30738        hw_unique_id: [0_u8; 16usize],
30739        sw_version_major: 0_u8,
30740        sw_version_minor: 0_u8,
30741    };
30742    #[cfg(feature = "arbitrary")]
30743    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30744        use arbitrary::{Arbitrary, Unstructured};
30745        let mut buf = [0u8; 1024];
30746        rng.fill_bytes(&mut buf);
30747        let mut unstructured = Unstructured::new(&buf);
30748        Self::arbitrary(&mut unstructured).unwrap_or_default()
30749    }
30750}
30751impl Default for UAVCAN_NODE_INFO_DATA {
30752    fn default() -> Self {
30753        Self::DEFAULT.clone()
30754    }
30755}
30756impl MessageData for UAVCAN_NODE_INFO_DATA {
30757    type Message = MavMessage;
30758    const ID: u32 = 311u32;
30759    const NAME: &'static str = "UAVCAN_NODE_INFO";
30760    const EXTRA_CRC: u8 = 95u8;
30761    const ENCODED_LEN: usize = 116usize;
30762    fn deser(
30763        _version: MavlinkVersion,
30764        __input: &[u8],
30765    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30766        let avail_len = __input.len();
30767        let mut payload_buf = [0; Self::ENCODED_LEN];
30768        let mut buf = if avail_len < Self::ENCODED_LEN {
30769            payload_buf[0..avail_len].copy_from_slice(__input);
30770            Bytes::new(&payload_buf)
30771        } else {
30772            Bytes::new(__input)
30773        };
30774        let mut __struct = Self::default();
30775        __struct.time_usec = buf.get_u64_le();
30776        __struct.uptime_sec = buf.get_u32_le();
30777        __struct.sw_vcs_commit = buf.get_u32_le();
30778        for v in &mut __struct.name {
30779            let val = buf.get_u8();
30780            *v = val;
30781        }
30782        __struct.hw_version_major = buf.get_u8();
30783        __struct.hw_version_minor = buf.get_u8();
30784        for v in &mut __struct.hw_unique_id {
30785            let val = buf.get_u8();
30786            *v = val;
30787        }
30788        __struct.sw_version_major = buf.get_u8();
30789        __struct.sw_version_minor = buf.get_u8();
30790        Ok(__struct)
30791    }
30792    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30793        let mut __tmp = BytesMut::new(bytes);
30794        #[allow(clippy::absurd_extreme_comparisons)]
30795        #[allow(unused_comparisons)]
30796        if __tmp.remaining() < Self::ENCODED_LEN {
30797            panic!(
30798                "buffer is too small (need {} bytes, but got {})",
30799                Self::ENCODED_LEN,
30800                __tmp.remaining(),
30801            )
30802        }
30803        __tmp.put_u64_le(self.time_usec);
30804        __tmp.put_u32_le(self.uptime_sec);
30805        __tmp.put_u32_le(self.sw_vcs_commit);
30806        for val in &self.name {
30807            __tmp.put_u8(*val);
30808        }
30809        __tmp.put_u8(self.hw_version_major);
30810        __tmp.put_u8(self.hw_version_minor);
30811        for val in &self.hw_unique_id {
30812            __tmp.put_u8(*val);
30813        }
30814        __tmp.put_u8(self.sw_version_major);
30815        __tmp.put_u8(self.sw_version_minor);
30816        if matches!(version, MavlinkVersion::V2) {
30817            let len = __tmp.len();
30818            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30819        } else {
30820            __tmp.len()
30821        }
30822    }
30823}
30824#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
30825#[doc = ""]
30826#[doc = "ID: 310"]
30827#[derive(Debug, Clone, PartialEq)]
30828#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30829#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30830#[cfg_attr(feature = "ts", derive(TS))]
30831#[cfg_attr(feature = "ts", ts(export))]
30832pub struct UAVCAN_NODE_STATUS_DATA {
30833    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30834    pub time_usec: u64,
30835    #[doc = "Time since the start-up of the node."]
30836    pub uptime_sec: u32,
30837    #[doc = "Vendor-specific status information."]
30838    pub vendor_specific_status_code: u16,
30839    #[doc = "Generalized node health status."]
30840    pub health: UavcanNodeHealth,
30841    #[doc = "Generalized operating mode."]
30842    pub mode: UavcanNodeMode,
30843    #[doc = "Not used currently."]
30844    pub sub_mode: u8,
30845}
30846impl UAVCAN_NODE_STATUS_DATA {
30847    pub const ENCODED_LEN: usize = 17usize;
30848    pub const DEFAULT: Self = Self {
30849        time_usec: 0_u64,
30850        uptime_sec: 0_u32,
30851        vendor_specific_status_code: 0_u16,
30852        health: UavcanNodeHealth::DEFAULT,
30853        mode: UavcanNodeMode::DEFAULT,
30854        sub_mode: 0_u8,
30855    };
30856    #[cfg(feature = "arbitrary")]
30857    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30858        use arbitrary::{Arbitrary, Unstructured};
30859        let mut buf = [0u8; 1024];
30860        rng.fill_bytes(&mut buf);
30861        let mut unstructured = Unstructured::new(&buf);
30862        Self::arbitrary(&mut unstructured).unwrap_or_default()
30863    }
30864}
30865impl Default for UAVCAN_NODE_STATUS_DATA {
30866    fn default() -> Self {
30867        Self::DEFAULT.clone()
30868    }
30869}
30870impl MessageData for UAVCAN_NODE_STATUS_DATA {
30871    type Message = MavMessage;
30872    const ID: u32 = 310u32;
30873    const NAME: &'static str = "UAVCAN_NODE_STATUS";
30874    const EXTRA_CRC: u8 = 28u8;
30875    const ENCODED_LEN: usize = 17usize;
30876    fn deser(
30877        _version: MavlinkVersion,
30878        __input: &[u8],
30879    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30880        let avail_len = __input.len();
30881        let mut payload_buf = [0; Self::ENCODED_LEN];
30882        let mut buf = if avail_len < Self::ENCODED_LEN {
30883            payload_buf[0..avail_len].copy_from_slice(__input);
30884            Bytes::new(&payload_buf)
30885        } else {
30886            Bytes::new(__input)
30887        };
30888        let mut __struct = Self::default();
30889        __struct.time_usec = buf.get_u64_le();
30890        __struct.uptime_sec = buf.get_u32_le();
30891        __struct.vendor_specific_status_code = buf.get_u16_le();
30892        let tmp = buf.get_u8();
30893        __struct.health =
30894            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30895                enum_type: "UavcanNodeHealth",
30896                value: tmp as u32,
30897            })?;
30898        let tmp = buf.get_u8();
30899        __struct.mode =
30900            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30901                enum_type: "UavcanNodeMode",
30902                value: tmp as u32,
30903            })?;
30904        __struct.sub_mode = buf.get_u8();
30905        Ok(__struct)
30906    }
30907    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30908        let mut __tmp = BytesMut::new(bytes);
30909        #[allow(clippy::absurd_extreme_comparisons)]
30910        #[allow(unused_comparisons)]
30911        if __tmp.remaining() < Self::ENCODED_LEN {
30912            panic!(
30913                "buffer is too small (need {} bytes, but got {})",
30914                Self::ENCODED_LEN,
30915                __tmp.remaining(),
30916            )
30917        }
30918        __tmp.put_u64_le(self.time_usec);
30919        __tmp.put_u32_le(self.uptime_sec);
30920        __tmp.put_u16_le(self.vendor_specific_status_code);
30921        __tmp.put_u8(self.health as u8);
30922        __tmp.put_u8(self.mode as u8);
30923        __tmp.put_u8(self.sub_mode);
30924        if matches!(version, MavlinkVersion::V2) {
30925            let len = __tmp.len();
30926            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30927        } else {
30928            __tmp.len()
30929        }
30930    }
30931}
30932#[doc = "The global position resulting from GPS and sensor fusion."]
30933#[doc = ""]
30934#[doc = "ID: 340"]
30935#[derive(Debug, Clone, PartialEq)]
30936#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30937#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30938#[cfg_attr(feature = "ts", derive(TS))]
30939#[cfg_attr(feature = "ts", ts(export))]
30940pub struct UTM_GLOBAL_POSITION_DATA {
30941    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
30942    pub time: u64,
30943    #[doc = "Latitude (WGS84)"]
30944    pub lat: i32,
30945    #[doc = "Longitude (WGS84)"]
30946    pub lon: i32,
30947    #[doc = "Altitude (WGS84)"]
30948    pub alt: i32,
30949    #[doc = "Altitude above ground"]
30950    pub relative_alt: i32,
30951    #[doc = "Next waypoint, latitude (WGS84)"]
30952    pub next_lat: i32,
30953    #[doc = "Next waypoint, longitude (WGS84)"]
30954    pub next_lon: i32,
30955    #[doc = "Next waypoint, altitude (WGS84)"]
30956    pub next_alt: i32,
30957    #[doc = "Ground X speed (latitude, positive north)"]
30958    pub vx: i16,
30959    #[doc = "Ground Y speed (longitude, positive east)"]
30960    pub vy: i16,
30961    #[doc = "Ground Z speed (altitude, positive down)"]
30962    pub vz: i16,
30963    #[doc = "Horizontal position uncertainty (standard deviation)"]
30964    pub h_acc: u16,
30965    #[doc = "Altitude uncertainty (standard deviation)"]
30966    pub v_acc: u16,
30967    #[doc = "Speed uncertainty (standard deviation)"]
30968    pub vel_acc: u16,
30969    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
30970    pub update_rate: u16,
30971    #[doc = "Unique UAS ID."]
30972    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30973    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30974    pub uas_id: [u8; 18],
30975    #[doc = "Flight state"]
30976    pub flight_state: UtmFlightState,
30977    #[doc = "Bitwise OR combination of the data available flags."]
30978    pub flags: UtmDataAvailFlags,
30979}
30980impl UTM_GLOBAL_POSITION_DATA {
30981    pub const ENCODED_LEN: usize = 70usize;
30982    pub const DEFAULT: Self = Self {
30983        time: 0_u64,
30984        lat: 0_i32,
30985        lon: 0_i32,
30986        alt: 0_i32,
30987        relative_alt: 0_i32,
30988        next_lat: 0_i32,
30989        next_lon: 0_i32,
30990        next_alt: 0_i32,
30991        vx: 0_i16,
30992        vy: 0_i16,
30993        vz: 0_i16,
30994        h_acc: 0_u16,
30995        v_acc: 0_u16,
30996        vel_acc: 0_u16,
30997        update_rate: 0_u16,
30998        uas_id: [0_u8; 18usize],
30999        flight_state: UtmFlightState::DEFAULT,
31000        flags: UtmDataAvailFlags::DEFAULT,
31001    };
31002    #[cfg(feature = "arbitrary")]
31003    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31004        use arbitrary::{Arbitrary, Unstructured};
31005        let mut buf = [0u8; 1024];
31006        rng.fill_bytes(&mut buf);
31007        let mut unstructured = Unstructured::new(&buf);
31008        Self::arbitrary(&mut unstructured).unwrap_or_default()
31009    }
31010}
31011impl Default for UTM_GLOBAL_POSITION_DATA {
31012    fn default() -> Self {
31013        Self::DEFAULT.clone()
31014    }
31015}
31016impl MessageData for UTM_GLOBAL_POSITION_DATA {
31017    type Message = MavMessage;
31018    const ID: u32 = 340u32;
31019    const NAME: &'static str = "UTM_GLOBAL_POSITION";
31020    const EXTRA_CRC: u8 = 99u8;
31021    const ENCODED_LEN: usize = 70usize;
31022    fn deser(
31023        _version: MavlinkVersion,
31024        __input: &[u8],
31025    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31026        let avail_len = __input.len();
31027        let mut payload_buf = [0; Self::ENCODED_LEN];
31028        let mut buf = if avail_len < Self::ENCODED_LEN {
31029            payload_buf[0..avail_len].copy_from_slice(__input);
31030            Bytes::new(&payload_buf)
31031        } else {
31032            Bytes::new(__input)
31033        };
31034        let mut __struct = Self::default();
31035        __struct.time = buf.get_u64_le();
31036        __struct.lat = buf.get_i32_le();
31037        __struct.lon = buf.get_i32_le();
31038        __struct.alt = buf.get_i32_le();
31039        __struct.relative_alt = buf.get_i32_le();
31040        __struct.next_lat = buf.get_i32_le();
31041        __struct.next_lon = buf.get_i32_le();
31042        __struct.next_alt = buf.get_i32_le();
31043        __struct.vx = buf.get_i16_le();
31044        __struct.vy = buf.get_i16_le();
31045        __struct.vz = buf.get_i16_le();
31046        __struct.h_acc = buf.get_u16_le();
31047        __struct.v_acc = buf.get_u16_le();
31048        __struct.vel_acc = buf.get_u16_le();
31049        __struct.update_rate = buf.get_u16_le();
31050        for v in &mut __struct.uas_id {
31051            let val = buf.get_u8();
31052            *v = val;
31053        }
31054        let tmp = buf.get_u8();
31055        __struct.flight_state =
31056            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31057                enum_type: "UtmFlightState",
31058                value: tmp as u32,
31059            })?;
31060        let tmp = buf.get_u8();
31061        __struct.flags = UtmDataAvailFlags::from_bits(tmp & UtmDataAvailFlags::all().bits())
31062            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31063                flag_type: "UtmDataAvailFlags",
31064                value: tmp as u32,
31065            })?;
31066        Ok(__struct)
31067    }
31068    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31069        let mut __tmp = BytesMut::new(bytes);
31070        #[allow(clippy::absurd_extreme_comparisons)]
31071        #[allow(unused_comparisons)]
31072        if __tmp.remaining() < Self::ENCODED_LEN {
31073            panic!(
31074                "buffer is too small (need {} bytes, but got {})",
31075                Self::ENCODED_LEN,
31076                __tmp.remaining(),
31077            )
31078        }
31079        __tmp.put_u64_le(self.time);
31080        __tmp.put_i32_le(self.lat);
31081        __tmp.put_i32_le(self.lon);
31082        __tmp.put_i32_le(self.alt);
31083        __tmp.put_i32_le(self.relative_alt);
31084        __tmp.put_i32_le(self.next_lat);
31085        __tmp.put_i32_le(self.next_lon);
31086        __tmp.put_i32_le(self.next_alt);
31087        __tmp.put_i16_le(self.vx);
31088        __tmp.put_i16_le(self.vy);
31089        __tmp.put_i16_le(self.vz);
31090        __tmp.put_u16_le(self.h_acc);
31091        __tmp.put_u16_le(self.v_acc);
31092        __tmp.put_u16_le(self.vel_acc);
31093        __tmp.put_u16_le(self.update_rate);
31094        for val in &self.uas_id {
31095            __tmp.put_u8(*val);
31096        }
31097        __tmp.put_u8(self.flight_state as u8);
31098        __tmp.put_u8(self.flags.bits());
31099        if matches!(version, MavlinkVersion::V2) {
31100            let len = __tmp.len();
31101            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31102        } else {
31103            __tmp.len()
31104        }
31105    }
31106}
31107#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
31108#[doc = ""]
31109#[doc = "ID: 248"]
31110#[derive(Debug, Clone, PartialEq)]
31111#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31112#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31113#[cfg_attr(feature = "ts", derive(TS))]
31114#[cfg_attr(feature = "ts", ts(export))]
31115pub struct V2_EXTENSION_DATA {
31116    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
31117    pub message_type: u16,
31118    #[doc = "Network ID (0 for broadcast)"]
31119    pub target_network: u8,
31120    #[doc = "System ID (0 for broadcast)"]
31121    pub target_system: u8,
31122    #[doc = "Component ID (0 for broadcast)"]
31123    pub target_component: u8,
31124    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
31125    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31126    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31127    pub payload: [u8; 249],
31128}
31129impl V2_EXTENSION_DATA {
31130    pub const ENCODED_LEN: usize = 254usize;
31131    pub const DEFAULT: Self = Self {
31132        message_type: 0_u16,
31133        target_network: 0_u8,
31134        target_system: 0_u8,
31135        target_component: 0_u8,
31136        payload: [0_u8; 249usize],
31137    };
31138    #[cfg(feature = "arbitrary")]
31139    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31140        use arbitrary::{Arbitrary, Unstructured};
31141        let mut buf = [0u8; 1024];
31142        rng.fill_bytes(&mut buf);
31143        let mut unstructured = Unstructured::new(&buf);
31144        Self::arbitrary(&mut unstructured).unwrap_or_default()
31145    }
31146}
31147impl Default for V2_EXTENSION_DATA {
31148    fn default() -> Self {
31149        Self::DEFAULT.clone()
31150    }
31151}
31152impl MessageData for V2_EXTENSION_DATA {
31153    type Message = MavMessage;
31154    const ID: u32 = 248u32;
31155    const NAME: &'static str = "V2_EXTENSION";
31156    const EXTRA_CRC: u8 = 8u8;
31157    const ENCODED_LEN: usize = 254usize;
31158    fn deser(
31159        _version: MavlinkVersion,
31160        __input: &[u8],
31161    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31162        let avail_len = __input.len();
31163        let mut payload_buf = [0; Self::ENCODED_LEN];
31164        let mut buf = if avail_len < Self::ENCODED_LEN {
31165            payload_buf[0..avail_len].copy_from_slice(__input);
31166            Bytes::new(&payload_buf)
31167        } else {
31168            Bytes::new(__input)
31169        };
31170        let mut __struct = Self::default();
31171        __struct.message_type = buf.get_u16_le();
31172        __struct.target_network = buf.get_u8();
31173        __struct.target_system = buf.get_u8();
31174        __struct.target_component = buf.get_u8();
31175        for v in &mut __struct.payload {
31176            let val = buf.get_u8();
31177            *v = val;
31178        }
31179        Ok(__struct)
31180    }
31181    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31182        let mut __tmp = BytesMut::new(bytes);
31183        #[allow(clippy::absurd_extreme_comparisons)]
31184        #[allow(unused_comparisons)]
31185        if __tmp.remaining() < Self::ENCODED_LEN {
31186            panic!(
31187                "buffer is too small (need {} bytes, but got {})",
31188                Self::ENCODED_LEN,
31189                __tmp.remaining(),
31190            )
31191        }
31192        __tmp.put_u16_le(self.message_type);
31193        __tmp.put_u8(self.target_network);
31194        __tmp.put_u8(self.target_system);
31195        __tmp.put_u8(self.target_component);
31196        for val in &self.payload {
31197            __tmp.put_u8(*val);
31198        }
31199        if matches!(version, MavlinkVersion::V2) {
31200            let len = __tmp.len();
31201            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31202        } else {
31203            __tmp.len()
31204        }
31205    }
31206}
31207#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
31208#[doc = ""]
31209#[doc = "ID: 74"]
31210#[derive(Debug, Clone, PartialEq)]
31211#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31212#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31213#[cfg_attr(feature = "ts", derive(TS))]
31214#[cfg_attr(feature = "ts", ts(export))]
31215pub struct VFR_HUD_DATA {
31216    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
31217    pub airspeed: f32,
31218    #[doc = "Current ground speed."]
31219    pub groundspeed: f32,
31220    #[doc = "Current altitude (MSL)."]
31221    pub alt: f32,
31222    #[doc = "Current climb rate."]
31223    pub climb: f32,
31224    #[doc = "Current heading in compass units (0-360, 0=north)."]
31225    pub heading: i16,
31226    #[doc = "Current throttle setting (0 to 100)."]
31227    pub throttle: u16,
31228}
31229impl VFR_HUD_DATA {
31230    pub const ENCODED_LEN: usize = 20usize;
31231    pub const DEFAULT: Self = Self {
31232        airspeed: 0.0_f32,
31233        groundspeed: 0.0_f32,
31234        alt: 0.0_f32,
31235        climb: 0.0_f32,
31236        heading: 0_i16,
31237        throttle: 0_u16,
31238    };
31239    #[cfg(feature = "arbitrary")]
31240    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31241        use arbitrary::{Arbitrary, Unstructured};
31242        let mut buf = [0u8; 1024];
31243        rng.fill_bytes(&mut buf);
31244        let mut unstructured = Unstructured::new(&buf);
31245        Self::arbitrary(&mut unstructured).unwrap_or_default()
31246    }
31247}
31248impl Default for VFR_HUD_DATA {
31249    fn default() -> Self {
31250        Self::DEFAULT.clone()
31251    }
31252}
31253impl MessageData for VFR_HUD_DATA {
31254    type Message = MavMessage;
31255    const ID: u32 = 74u32;
31256    const NAME: &'static str = "VFR_HUD";
31257    const EXTRA_CRC: u8 = 20u8;
31258    const ENCODED_LEN: usize = 20usize;
31259    fn deser(
31260        _version: MavlinkVersion,
31261        __input: &[u8],
31262    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31263        let avail_len = __input.len();
31264        let mut payload_buf = [0; Self::ENCODED_LEN];
31265        let mut buf = if avail_len < Self::ENCODED_LEN {
31266            payload_buf[0..avail_len].copy_from_slice(__input);
31267            Bytes::new(&payload_buf)
31268        } else {
31269            Bytes::new(__input)
31270        };
31271        let mut __struct = Self::default();
31272        __struct.airspeed = buf.get_f32_le();
31273        __struct.groundspeed = buf.get_f32_le();
31274        __struct.alt = buf.get_f32_le();
31275        __struct.climb = buf.get_f32_le();
31276        __struct.heading = buf.get_i16_le();
31277        __struct.throttle = buf.get_u16_le();
31278        Ok(__struct)
31279    }
31280    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31281        let mut __tmp = BytesMut::new(bytes);
31282        #[allow(clippy::absurd_extreme_comparisons)]
31283        #[allow(unused_comparisons)]
31284        if __tmp.remaining() < Self::ENCODED_LEN {
31285            panic!(
31286                "buffer is too small (need {} bytes, but got {})",
31287                Self::ENCODED_LEN,
31288                __tmp.remaining(),
31289            )
31290        }
31291        __tmp.put_f32_le(self.airspeed);
31292        __tmp.put_f32_le(self.groundspeed);
31293        __tmp.put_f32_le(self.alt);
31294        __tmp.put_f32_le(self.climb);
31295        __tmp.put_i16_le(self.heading);
31296        __tmp.put_u16_le(self.throttle);
31297        if matches!(version, MavlinkVersion::V2) {
31298            let len = __tmp.len();
31299            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31300        } else {
31301            __tmp.len()
31302        }
31303    }
31304}
31305#[doc = "Vibration levels and accelerometer clipping."]
31306#[doc = ""]
31307#[doc = "ID: 241"]
31308#[derive(Debug, Clone, PartialEq)]
31309#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31310#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31311#[cfg_attr(feature = "ts", derive(TS))]
31312#[cfg_attr(feature = "ts", ts(export))]
31313pub struct VIBRATION_DATA {
31314    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31315    pub time_usec: u64,
31316    #[doc = "Vibration levels on X-axis"]
31317    pub vibration_x: f32,
31318    #[doc = "Vibration levels on Y-axis"]
31319    pub vibration_y: f32,
31320    #[doc = "Vibration levels on Z-axis"]
31321    pub vibration_z: f32,
31322    #[doc = "first accelerometer clipping count"]
31323    pub clipping_0: u32,
31324    #[doc = "second accelerometer clipping count"]
31325    pub clipping_1: u32,
31326    #[doc = "third accelerometer clipping count"]
31327    pub clipping_2: u32,
31328}
31329impl VIBRATION_DATA {
31330    pub const ENCODED_LEN: usize = 32usize;
31331    pub const DEFAULT: Self = Self {
31332        time_usec: 0_u64,
31333        vibration_x: 0.0_f32,
31334        vibration_y: 0.0_f32,
31335        vibration_z: 0.0_f32,
31336        clipping_0: 0_u32,
31337        clipping_1: 0_u32,
31338        clipping_2: 0_u32,
31339    };
31340    #[cfg(feature = "arbitrary")]
31341    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31342        use arbitrary::{Arbitrary, Unstructured};
31343        let mut buf = [0u8; 1024];
31344        rng.fill_bytes(&mut buf);
31345        let mut unstructured = Unstructured::new(&buf);
31346        Self::arbitrary(&mut unstructured).unwrap_or_default()
31347    }
31348}
31349impl Default for VIBRATION_DATA {
31350    fn default() -> Self {
31351        Self::DEFAULT.clone()
31352    }
31353}
31354impl MessageData for VIBRATION_DATA {
31355    type Message = MavMessage;
31356    const ID: u32 = 241u32;
31357    const NAME: &'static str = "VIBRATION";
31358    const EXTRA_CRC: u8 = 90u8;
31359    const ENCODED_LEN: usize = 32usize;
31360    fn deser(
31361        _version: MavlinkVersion,
31362        __input: &[u8],
31363    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31364        let avail_len = __input.len();
31365        let mut payload_buf = [0; Self::ENCODED_LEN];
31366        let mut buf = if avail_len < Self::ENCODED_LEN {
31367            payload_buf[0..avail_len].copy_from_slice(__input);
31368            Bytes::new(&payload_buf)
31369        } else {
31370            Bytes::new(__input)
31371        };
31372        let mut __struct = Self::default();
31373        __struct.time_usec = buf.get_u64_le();
31374        __struct.vibration_x = buf.get_f32_le();
31375        __struct.vibration_y = buf.get_f32_le();
31376        __struct.vibration_z = buf.get_f32_le();
31377        __struct.clipping_0 = buf.get_u32_le();
31378        __struct.clipping_1 = buf.get_u32_le();
31379        __struct.clipping_2 = buf.get_u32_le();
31380        Ok(__struct)
31381    }
31382    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31383        let mut __tmp = BytesMut::new(bytes);
31384        #[allow(clippy::absurd_extreme_comparisons)]
31385        #[allow(unused_comparisons)]
31386        if __tmp.remaining() < Self::ENCODED_LEN {
31387            panic!(
31388                "buffer is too small (need {} bytes, but got {})",
31389                Self::ENCODED_LEN,
31390                __tmp.remaining(),
31391            )
31392        }
31393        __tmp.put_u64_le(self.time_usec);
31394        __tmp.put_f32_le(self.vibration_x);
31395        __tmp.put_f32_le(self.vibration_y);
31396        __tmp.put_f32_le(self.vibration_z);
31397        __tmp.put_u32_le(self.clipping_0);
31398        __tmp.put_u32_le(self.clipping_1);
31399        __tmp.put_u32_le(self.clipping_2);
31400        if matches!(version, MavlinkVersion::V2) {
31401            let len = __tmp.len();
31402            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31403        } else {
31404            __tmp.len()
31405        }
31406    }
31407}
31408#[doc = "Global position estimate from a Vicon motion system source."]
31409#[doc = ""]
31410#[doc = "ID: 104"]
31411#[derive(Debug, Clone, PartialEq)]
31412#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31413#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31414#[cfg_attr(feature = "ts", derive(TS))]
31415#[cfg_attr(feature = "ts", ts(export))]
31416pub struct VICON_POSITION_ESTIMATE_DATA {
31417    #[doc = "Timestamp (UNIX time or time since system boot)"]
31418    pub usec: u64,
31419    #[doc = "Global X position"]
31420    pub x: f32,
31421    #[doc = "Global Y position"]
31422    pub y: f32,
31423    #[doc = "Global Z position"]
31424    pub z: f32,
31425    #[doc = "Roll angle"]
31426    pub roll: f32,
31427    #[doc = "Pitch angle"]
31428    pub pitch: f32,
31429    #[doc = "Yaw angle"]
31430    pub yaw: f32,
31431    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31432    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31433    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31434    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31435    pub covariance: [f32; 21],
31436}
31437impl VICON_POSITION_ESTIMATE_DATA {
31438    pub const ENCODED_LEN: usize = 116usize;
31439    pub const DEFAULT: Self = Self {
31440        usec: 0_u64,
31441        x: 0.0_f32,
31442        y: 0.0_f32,
31443        z: 0.0_f32,
31444        roll: 0.0_f32,
31445        pitch: 0.0_f32,
31446        yaw: 0.0_f32,
31447        covariance: [0.0_f32; 21usize],
31448    };
31449    #[cfg(feature = "arbitrary")]
31450    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31451        use arbitrary::{Arbitrary, Unstructured};
31452        let mut buf = [0u8; 1024];
31453        rng.fill_bytes(&mut buf);
31454        let mut unstructured = Unstructured::new(&buf);
31455        Self::arbitrary(&mut unstructured).unwrap_or_default()
31456    }
31457}
31458impl Default for VICON_POSITION_ESTIMATE_DATA {
31459    fn default() -> Self {
31460        Self::DEFAULT.clone()
31461    }
31462}
31463impl MessageData for VICON_POSITION_ESTIMATE_DATA {
31464    type Message = MavMessage;
31465    const ID: u32 = 104u32;
31466    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
31467    const EXTRA_CRC: u8 = 56u8;
31468    const ENCODED_LEN: usize = 116usize;
31469    fn deser(
31470        _version: MavlinkVersion,
31471        __input: &[u8],
31472    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31473        let avail_len = __input.len();
31474        let mut payload_buf = [0; Self::ENCODED_LEN];
31475        let mut buf = if avail_len < Self::ENCODED_LEN {
31476            payload_buf[0..avail_len].copy_from_slice(__input);
31477            Bytes::new(&payload_buf)
31478        } else {
31479            Bytes::new(__input)
31480        };
31481        let mut __struct = Self::default();
31482        __struct.usec = buf.get_u64_le();
31483        __struct.x = buf.get_f32_le();
31484        __struct.y = buf.get_f32_le();
31485        __struct.z = buf.get_f32_le();
31486        __struct.roll = buf.get_f32_le();
31487        __struct.pitch = buf.get_f32_le();
31488        __struct.yaw = buf.get_f32_le();
31489        for v in &mut __struct.covariance {
31490            let val = buf.get_f32_le();
31491            *v = val;
31492        }
31493        Ok(__struct)
31494    }
31495    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31496        let mut __tmp = BytesMut::new(bytes);
31497        #[allow(clippy::absurd_extreme_comparisons)]
31498        #[allow(unused_comparisons)]
31499        if __tmp.remaining() < Self::ENCODED_LEN {
31500            panic!(
31501                "buffer is too small (need {} bytes, but got {})",
31502                Self::ENCODED_LEN,
31503                __tmp.remaining(),
31504            )
31505        }
31506        __tmp.put_u64_le(self.usec);
31507        __tmp.put_f32_le(self.x);
31508        __tmp.put_f32_le(self.y);
31509        __tmp.put_f32_le(self.z);
31510        __tmp.put_f32_le(self.roll);
31511        __tmp.put_f32_le(self.pitch);
31512        __tmp.put_f32_le(self.yaw);
31513        if matches!(version, MavlinkVersion::V2) {
31514            for val in &self.covariance {
31515                __tmp.put_f32_le(*val);
31516            }
31517            let len = __tmp.len();
31518            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31519        } else {
31520            __tmp.len()
31521        }
31522    }
31523}
31524#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
31525#[doc = ""]
31526#[doc = "ID: 269"]
31527#[derive(Debug, Clone, PartialEq)]
31528#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31529#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31530#[cfg_attr(feature = "ts", derive(TS))]
31531#[cfg_attr(feature = "ts", ts(export))]
31532pub struct VIDEO_STREAM_INFORMATION_DATA {
31533    #[doc = "Frame rate."]
31534    pub framerate: f32,
31535    #[doc = "Bit rate."]
31536    pub bitrate: u32,
31537    #[doc = "Bitmap of stream status flags."]
31538    pub flags: VideoStreamStatusFlags,
31539    #[doc = "Horizontal resolution."]
31540    pub resolution_h: u16,
31541    #[doc = "Vertical resolution."]
31542    pub resolution_v: u16,
31543    #[doc = "Video image rotation clockwise."]
31544    pub rotation: u16,
31545    #[doc = "Horizontal Field of view."]
31546    pub hfov: u16,
31547    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31548    pub stream_id: u8,
31549    #[doc = "Number of streams available."]
31550    pub count: u8,
31551    #[doc = "Type of stream."]
31552    pub mavtype: VideoStreamType,
31553    #[doc = "Stream name."]
31554    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31555    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31556    pub name: [u8; 32],
31557    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
31558    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31559    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31560    pub uri: [u8; 160],
31561    #[doc = "Encoding of stream."]
31562    #[cfg_attr(feature = "serde", serde(default))]
31563    pub encoding: VideoStreamEncoding,
31564    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31565    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31566    pub camera_device_id: u8,
31567}
31568impl VIDEO_STREAM_INFORMATION_DATA {
31569    pub const ENCODED_LEN: usize = 215usize;
31570    pub const DEFAULT: Self = Self {
31571        framerate: 0.0_f32,
31572        bitrate: 0_u32,
31573        flags: VideoStreamStatusFlags::DEFAULT,
31574        resolution_h: 0_u16,
31575        resolution_v: 0_u16,
31576        rotation: 0_u16,
31577        hfov: 0_u16,
31578        stream_id: 0_u8,
31579        count: 0_u8,
31580        mavtype: VideoStreamType::DEFAULT,
31581        name: [0_u8; 32usize],
31582        uri: [0_u8; 160usize],
31583        encoding: VideoStreamEncoding::DEFAULT,
31584        camera_device_id: 0_u8,
31585    };
31586    #[cfg(feature = "arbitrary")]
31587    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31588        use arbitrary::{Arbitrary, Unstructured};
31589        let mut buf = [0u8; 1024];
31590        rng.fill_bytes(&mut buf);
31591        let mut unstructured = Unstructured::new(&buf);
31592        Self::arbitrary(&mut unstructured).unwrap_or_default()
31593    }
31594}
31595impl Default for VIDEO_STREAM_INFORMATION_DATA {
31596    fn default() -> Self {
31597        Self::DEFAULT.clone()
31598    }
31599}
31600impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
31601    type Message = MavMessage;
31602    const ID: u32 = 269u32;
31603    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
31604    const EXTRA_CRC: u8 = 109u8;
31605    const ENCODED_LEN: usize = 215usize;
31606    fn deser(
31607        _version: MavlinkVersion,
31608        __input: &[u8],
31609    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31610        let avail_len = __input.len();
31611        let mut payload_buf = [0; Self::ENCODED_LEN];
31612        let mut buf = if avail_len < Self::ENCODED_LEN {
31613            payload_buf[0..avail_len].copy_from_slice(__input);
31614            Bytes::new(&payload_buf)
31615        } else {
31616            Bytes::new(__input)
31617        };
31618        let mut __struct = Self::default();
31619        __struct.framerate = buf.get_f32_le();
31620        __struct.bitrate = buf.get_u32_le();
31621        let tmp = buf.get_u16_le();
31622        __struct.flags = VideoStreamStatusFlags::from_bits(
31623            tmp & VideoStreamStatusFlags::all().bits(),
31624        )
31625        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31626            flag_type: "VideoStreamStatusFlags",
31627            value: tmp as u32,
31628        })?;
31629        __struct.resolution_h = buf.get_u16_le();
31630        __struct.resolution_v = buf.get_u16_le();
31631        __struct.rotation = buf.get_u16_le();
31632        __struct.hfov = buf.get_u16_le();
31633        __struct.stream_id = buf.get_u8();
31634        __struct.count = buf.get_u8();
31635        let tmp = buf.get_u8();
31636        __struct.mavtype =
31637            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31638                enum_type: "VideoStreamType",
31639                value: tmp as u32,
31640            })?;
31641        for v in &mut __struct.name {
31642            let val = buf.get_u8();
31643            *v = val;
31644        }
31645        for v in &mut __struct.uri {
31646            let val = buf.get_u8();
31647            *v = val;
31648        }
31649        let tmp = buf.get_u8();
31650        __struct.encoding =
31651            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31652                enum_type: "VideoStreamEncoding",
31653                value: tmp as u32,
31654            })?;
31655        __struct.camera_device_id = buf.get_u8();
31656        Ok(__struct)
31657    }
31658    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31659        let mut __tmp = BytesMut::new(bytes);
31660        #[allow(clippy::absurd_extreme_comparisons)]
31661        #[allow(unused_comparisons)]
31662        if __tmp.remaining() < Self::ENCODED_LEN {
31663            panic!(
31664                "buffer is too small (need {} bytes, but got {})",
31665                Self::ENCODED_LEN,
31666                __tmp.remaining(),
31667            )
31668        }
31669        __tmp.put_f32_le(self.framerate);
31670        __tmp.put_u32_le(self.bitrate);
31671        __tmp.put_u16_le(self.flags.bits());
31672        __tmp.put_u16_le(self.resolution_h);
31673        __tmp.put_u16_le(self.resolution_v);
31674        __tmp.put_u16_le(self.rotation);
31675        __tmp.put_u16_le(self.hfov);
31676        __tmp.put_u8(self.stream_id);
31677        __tmp.put_u8(self.count);
31678        __tmp.put_u8(self.mavtype as u8);
31679        for val in &self.name {
31680            __tmp.put_u8(*val);
31681        }
31682        for val in &self.uri {
31683            __tmp.put_u8(*val);
31684        }
31685        if matches!(version, MavlinkVersion::V2) {
31686            __tmp.put_u8(self.encoding as u8);
31687            __tmp.put_u8(self.camera_device_id);
31688            let len = __tmp.len();
31689            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31690        } else {
31691            __tmp.len()
31692        }
31693    }
31694}
31695#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
31696#[doc = ""]
31697#[doc = "ID: 270"]
31698#[derive(Debug, Clone, PartialEq)]
31699#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31700#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31701#[cfg_attr(feature = "ts", derive(TS))]
31702#[cfg_attr(feature = "ts", ts(export))]
31703pub struct VIDEO_STREAM_STATUS_DATA {
31704    #[doc = "Frame rate"]
31705    pub framerate: f32,
31706    #[doc = "Bit rate"]
31707    pub bitrate: u32,
31708    #[doc = "Bitmap of stream status flags"]
31709    pub flags: VideoStreamStatusFlags,
31710    #[doc = "Horizontal resolution"]
31711    pub resolution_h: u16,
31712    #[doc = "Vertical resolution"]
31713    pub resolution_v: u16,
31714    #[doc = "Video image rotation clockwise"]
31715    pub rotation: u16,
31716    #[doc = "Horizontal Field of view"]
31717    pub hfov: u16,
31718    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31719    pub stream_id: u8,
31720    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31721    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31722    pub camera_device_id: u8,
31723}
31724impl VIDEO_STREAM_STATUS_DATA {
31725    pub const ENCODED_LEN: usize = 20usize;
31726    pub const DEFAULT: Self = Self {
31727        framerate: 0.0_f32,
31728        bitrate: 0_u32,
31729        flags: VideoStreamStatusFlags::DEFAULT,
31730        resolution_h: 0_u16,
31731        resolution_v: 0_u16,
31732        rotation: 0_u16,
31733        hfov: 0_u16,
31734        stream_id: 0_u8,
31735        camera_device_id: 0_u8,
31736    };
31737    #[cfg(feature = "arbitrary")]
31738    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31739        use arbitrary::{Arbitrary, Unstructured};
31740        let mut buf = [0u8; 1024];
31741        rng.fill_bytes(&mut buf);
31742        let mut unstructured = Unstructured::new(&buf);
31743        Self::arbitrary(&mut unstructured).unwrap_or_default()
31744    }
31745}
31746impl Default for VIDEO_STREAM_STATUS_DATA {
31747    fn default() -> Self {
31748        Self::DEFAULT.clone()
31749    }
31750}
31751impl MessageData for VIDEO_STREAM_STATUS_DATA {
31752    type Message = MavMessage;
31753    const ID: u32 = 270u32;
31754    const NAME: &'static str = "VIDEO_STREAM_STATUS";
31755    const EXTRA_CRC: u8 = 59u8;
31756    const ENCODED_LEN: usize = 20usize;
31757    fn deser(
31758        _version: MavlinkVersion,
31759        __input: &[u8],
31760    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31761        let avail_len = __input.len();
31762        let mut payload_buf = [0; Self::ENCODED_LEN];
31763        let mut buf = if avail_len < Self::ENCODED_LEN {
31764            payload_buf[0..avail_len].copy_from_slice(__input);
31765            Bytes::new(&payload_buf)
31766        } else {
31767            Bytes::new(__input)
31768        };
31769        let mut __struct = Self::default();
31770        __struct.framerate = buf.get_f32_le();
31771        __struct.bitrate = buf.get_u32_le();
31772        let tmp = buf.get_u16_le();
31773        __struct.flags = VideoStreamStatusFlags::from_bits(
31774            tmp & VideoStreamStatusFlags::all().bits(),
31775        )
31776        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31777            flag_type: "VideoStreamStatusFlags",
31778            value: tmp as u32,
31779        })?;
31780        __struct.resolution_h = buf.get_u16_le();
31781        __struct.resolution_v = buf.get_u16_le();
31782        __struct.rotation = buf.get_u16_le();
31783        __struct.hfov = buf.get_u16_le();
31784        __struct.stream_id = buf.get_u8();
31785        __struct.camera_device_id = buf.get_u8();
31786        Ok(__struct)
31787    }
31788    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31789        let mut __tmp = BytesMut::new(bytes);
31790        #[allow(clippy::absurd_extreme_comparisons)]
31791        #[allow(unused_comparisons)]
31792        if __tmp.remaining() < Self::ENCODED_LEN {
31793            panic!(
31794                "buffer is too small (need {} bytes, but got {})",
31795                Self::ENCODED_LEN,
31796                __tmp.remaining(),
31797            )
31798        }
31799        __tmp.put_f32_le(self.framerate);
31800        __tmp.put_u32_le(self.bitrate);
31801        __tmp.put_u16_le(self.flags.bits());
31802        __tmp.put_u16_le(self.resolution_h);
31803        __tmp.put_u16_le(self.resolution_v);
31804        __tmp.put_u16_le(self.rotation);
31805        __tmp.put_u16_le(self.hfov);
31806        __tmp.put_u8(self.stream_id);
31807        if matches!(version, MavlinkVersion::V2) {
31808            __tmp.put_u8(self.camera_device_id);
31809            let len = __tmp.len();
31810            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31811        } else {
31812            __tmp.len()
31813        }
31814    }
31815}
31816#[doc = "Local position/attitude estimate from a vision source."]
31817#[doc = ""]
31818#[doc = "ID: 102"]
31819#[derive(Debug, Clone, PartialEq)]
31820#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31821#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31822#[cfg_attr(feature = "ts", derive(TS))]
31823#[cfg_attr(feature = "ts", ts(export))]
31824pub struct VISION_POSITION_ESTIMATE_DATA {
31825    #[doc = "Timestamp (UNIX time or time since system boot)"]
31826    pub usec: u64,
31827    #[doc = "Local X position"]
31828    pub x: f32,
31829    #[doc = "Local Y position"]
31830    pub y: f32,
31831    #[doc = "Local Z position"]
31832    pub z: f32,
31833    #[doc = "Roll angle"]
31834    pub roll: f32,
31835    #[doc = "Pitch angle"]
31836    pub pitch: f32,
31837    #[doc = "Yaw angle"]
31838    pub yaw: f32,
31839    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31840    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31841    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31842    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31843    pub covariance: [f32; 21],
31844    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31845    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31846    pub reset_counter: u8,
31847}
31848impl VISION_POSITION_ESTIMATE_DATA {
31849    pub const ENCODED_LEN: usize = 117usize;
31850    pub const DEFAULT: Self = Self {
31851        usec: 0_u64,
31852        x: 0.0_f32,
31853        y: 0.0_f32,
31854        z: 0.0_f32,
31855        roll: 0.0_f32,
31856        pitch: 0.0_f32,
31857        yaw: 0.0_f32,
31858        covariance: [0.0_f32; 21usize],
31859        reset_counter: 0_u8,
31860    };
31861    #[cfg(feature = "arbitrary")]
31862    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31863        use arbitrary::{Arbitrary, Unstructured};
31864        let mut buf = [0u8; 1024];
31865        rng.fill_bytes(&mut buf);
31866        let mut unstructured = Unstructured::new(&buf);
31867        Self::arbitrary(&mut unstructured).unwrap_or_default()
31868    }
31869}
31870impl Default for VISION_POSITION_ESTIMATE_DATA {
31871    fn default() -> Self {
31872        Self::DEFAULT.clone()
31873    }
31874}
31875impl MessageData for VISION_POSITION_ESTIMATE_DATA {
31876    type Message = MavMessage;
31877    const ID: u32 = 102u32;
31878    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
31879    const EXTRA_CRC: u8 = 158u8;
31880    const ENCODED_LEN: usize = 117usize;
31881    fn deser(
31882        _version: MavlinkVersion,
31883        __input: &[u8],
31884    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31885        let avail_len = __input.len();
31886        let mut payload_buf = [0; Self::ENCODED_LEN];
31887        let mut buf = if avail_len < Self::ENCODED_LEN {
31888            payload_buf[0..avail_len].copy_from_slice(__input);
31889            Bytes::new(&payload_buf)
31890        } else {
31891            Bytes::new(__input)
31892        };
31893        let mut __struct = Self::default();
31894        __struct.usec = buf.get_u64_le();
31895        __struct.x = buf.get_f32_le();
31896        __struct.y = buf.get_f32_le();
31897        __struct.z = buf.get_f32_le();
31898        __struct.roll = buf.get_f32_le();
31899        __struct.pitch = buf.get_f32_le();
31900        __struct.yaw = buf.get_f32_le();
31901        for v in &mut __struct.covariance {
31902            let val = buf.get_f32_le();
31903            *v = val;
31904        }
31905        __struct.reset_counter = buf.get_u8();
31906        Ok(__struct)
31907    }
31908    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31909        let mut __tmp = BytesMut::new(bytes);
31910        #[allow(clippy::absurd_extreme_comparisons)]
31911        #[allow(unused_comparisons)]
31912        if __tmp.remaining() < Self::ENCODED_LEN {
31913            panic!(
31914                "buffer is too small (need {} bytes, but got {})",
31915                Self::ENCODED_LEN,
31916                __tmp.remaining(),
31917            )
31918        }
31919        __tmp.put_u64_le(self.usec);
31920        __tmp.put_f32_le(self.x);
31921        __tmp.put_f32_le(self.y);
31922        __tmp.put_f32_le(self.z);
31923        __tmp.put_f32_le(self.roll);
31924        __tmp.put_f32_le(self.pitch);
31925        __tmp.put_f32_le(self.yaw);
31926        if matches!(version, MavlinkVersion::V2) {
31927            for val in &self.covariance {
31928                __tmp.put_f32_le(*val);
31929            }
31930            __tmp.put_u8(self.reset_counter);
31931            let len = __tmp.len();
31932            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31933        } else {
31934            __tmp.len()
31935        }
31936    }
31937}
31938#[doc = "Speed estimate from a vision source."]
31939#[doc = ""]
31940#[doc = "ID: 103"]
31941#[derive(Debug, Clone, PartialEq)]
31942#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31943#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31944#[cfg_attr(feature = "ts", derive(TS))]
31945#[cfg_attr(feature = "ts", ts(export))]
31946pub struct VISION_SPEED_ESTIMATE_DATA {
31947    #[doc = "Timestamp (UNIX time or time since system boot)"]
31948    pub usec: u64,
31949    #[doc = "Global X speed"]
31950    pub x: f32,
31951    #[doc = "Global Y speed"]
31952    pub y: f32,
31953    #[doc = "Global Z speed"]
31954    pub z: f32,
31955    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
31956    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31957    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31958    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31959    pub covariance: [f32; 9],
31960    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31961    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31962    pub reset_counter: u8,
31963}
31964impl VISION_SPEED_ESTIMATE_DATA {
31965    pub const ENCODED_LEN: usize = 57usize;
31966    pub const DEFAULT: Self = Self {
31967        usec: 0_u64,
31968        x: 0.0_f32,
31969        y: 0.0_f32,
31970        z: 0.0_f32,
31971        covariance: [0.0_f32; 9usize],
31972        reset_counter: 0_u8,
31973    };
31974    #[cfg(feature = "arbitrary")]
31975    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31976        use arbitrary::{Arbitrary, Unstructured};
31977        let mut buf = [0u8; 1024];
31978        rng.fill_bytes(&mut buf);
31979        let mut unstructured = Unstructured::new(&buf);
31980        Self::arbitrary(&mut unstructured).unwrap_or_default()
31981    }
31982}
31983impl Default for VISION_SPEED_ESTIMATE_DATA {
31984    fn default() -> Self {
31985        Self::DEFAULT.clone()
31986    }
31987}
31988impl MessageData for VISION_SPEED_ESTIMATE_DATA {
31989    type Message = MavMessage;
31990    const ID: u32 = 103u32;
31991    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
31992    const EXTRA_CRC: u8 = 208u8;
31993    const ENCODED_LEN: usize = 57usize;
31994    fn deser(
31995        _version: MavlinkVersion,
31996        __input: &[u8],
31997    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31998        let avail_len = __input.len();
31999        let mut payload_buf = [0; Self::ENCODED_LEN];
32000        let mut buf = if avail_len < Self::ENCODED_LEN {
32001            payload_buf[0..avail_len].copy_from_slice(__input);
32002            Bytes::new(&payload_buf)
32003        } else {
32004            Bytes::new(__input)
32005        };
32006        let mut __struct = Self::default();
32007        __struct.usec = buf.get_u64_le();
32008        __struct.x = buf.get_f32_le();
32009        __struct.y = buf.get_f32_le();
32010        __struct.z = buf.get_f32_le();
32011        for v in &mut __struct.covariance {
32012            let val = buf.get_f32_le();
32013            *v = val;
32014        }
32015        __struct.reset_counter = buf.get_u8();
32016        Ok(__struct)
32017    }
32018    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32019        let mut __tmp = BytesMut::new(bytes);
32020        #[allow(clippy::absurd_extreme_comparisons)]
32021        #[allow(unused_comparisons)]
32022        if __tmp.remaining() < Self::ENCODED_LEN {
32023            panic!(
32024                "buffer is too small (need {} bytes, but got {})",
32025                Self::ENCODED_LEN,
32026                __tmp.remaining(),
32027            )
32028        }
32029        __tmp.put_u64_le(self.usec);
32030        __tmp.put_f32_le(self.x);
32031        __tmp.put_f32_le(self.y);
32032        __tmp.put_f32_le(self.z);
32033        if matches!(version, MavlinkVersion::V2) {
32034            for val in &self.covariance {
32035                __tmp.put_f32_le(*val);
32036            }
32037            __tmp.put_u8(self.reset_counter);
32038            let len = __tmp.len();
32039            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32040        } else {
32041            __tmp.len()
32042        }
32043    }
32044}
32045#[doc = "Cumulative distance traveled for each reported wheel."]
32046#[doc = ""]
32047#[doc = "ID: 9000"]
32048#[derive(Debug, Clone, PartialEq)]
32049#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32050#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32051#[cfg_attr(feature = "ts", derive(TS))]
32052#[cfg_attr(feature = "ts", ts(export))]
32053pub struct WHEEL_DISTANCE_DATA {
32054    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32055    pub time_usec: u64,
32056    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
32057    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32058    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32059    pub distance: [f64; 16],
32060    #[doc = "Number of wheels reported."]
32061    pub count: u8,
32062}
32063impl WHEEL_DISTANCE_DATA {
32064    pub const ENCODED_LEN: usize = 137usize;
32065    pub const DEFAULT: Self = Self {
32066        time_usec: 0_u64,
32067        distance: [0.0_f64; 16usize],
32068        count: 0_u8,
32069    };
32070    #[cfg(feature = "arbitrary")]
32071    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32072        use arbitrary::{Arbitrary, Unstructured};
32073        let mut buf = [0u8; 1024];
32074        rng.fill_bytes(&mut buf);
32075        let mut unstructured = Unstructured::new(&buf);
32076        Self::arbitrary(&mut unstructured).unwrap_or_default()
32077    }
32078}
32079impl Default for WHEEL_DISTANCE_DATA {
32080    fn default() -> Self {
32081        Self::DEFAULT.clone()
32082    }
32083}
32084impl MessageData for WHEEL_DISTANCE_DATA {
32085    type Message = MavMessage;
32086    const ID: u32 = 9000u32;
32087    const NAME: &'static str = "WHEEL_DISTANCE";
32088    const EXTRA_CRC: u8 = 113u8;
32089    const ENCODED_LEN: usize = 137usize;
32090    fn deser(
32091        _version: MavlinkVersion,
32092        __input: &[u8],
32093    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32094        let avail_len = __input.len();
32095        let mut payload_buf = [0; Self::ENCODED_LEN];
32096        let mut buf = if avail_len < Self::ENCODED_LEN {
32097            payload_buf[0..avail_len].copy_from_slice(__input);
32098            Bytes::new(&payload_buf)
32099        } else {
32100            Bytes::new(__input)
32101        };
32102        let mut __struct = Self::default();
32103        __struct.time_usec = buf.get_u64_le();
32104        for v in &mut __struct.distance {
32105            let val = buf.get_f64_le();
32106            *v = val;
32107        }
32108        __struct.count = buf.get_u8();
32109        Ok(__struct)
32110    }
32111    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32112        let mut __tmp = BytesMut::new(bytes);
32113        #[allow(clippy::absurd_extreme_comparisons)]
32114        #[allow(unused_comparisons)]
32115        if __tmp.remaining() < Self::ENCODED_LEN {
32116            panic!(
32117                "buffer is too small (need {} bytes, but got {})",
32118                Self::ENCODED_LEN,
32119                __tmp.remaining(),
32120            )
32121        }
32122        __tmp.put_u64_le(self.time_usec);
32123        for val in &self.distance {
32124            __tmp.put_f64_le(*val);
32125        }
32126        __tmp.put_u8(self.count);
32127        if matches!(version, MavlinkVersion::V2) {
32128            let len = __tmp.len();
32129            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32130        } else {
32131            __tmp.len()
32132        }
32133    }
32134}
32135#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32136#[doc = ""]
32137#[doc = "ID: 299"]
32138#[derive(Debug, Clone, PartialEq)]
32139#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32140#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32141#[cfg_attr(feature = "ts", derive(TS))]
32142#[cfg_attr(feature = "ts", ts(export))]
32143pub struct WIFI_CONFIG_AP_DATA {
32144    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
32145    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32146    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32147    pub ssid: [u8; 32],
32148    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
32149    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32150    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32151    pub password: [u8; 64],
32152    #[doc = "WiFi Mode."]
32153    #[cfg_attr(feature = "serde", serde(default))]
32154    pub mode: WifiConfigApMode,
32155    #[doc = "Message acceptance response (sent back to GS)."]
32156    #[cfg_attr(feature = "serde", serde(default))]
32157    pub response: WifiConfigApResponse,
32158}
32159impl WIFI_CONFIG_AP_DATA {
32160    pub const ENCODED_LEN: usize = 98usize;
32161    pub const DEFAULT: Self = Self {
32162        ssid: [0_u8; 32usize],
32163        password: [0_u8; 64usize],
32164        mode: WifiConfigApMode::DEFAULT,
32165        response: WifiConfigApResponse::DEFAULT,
32166    };
32167    #[cfg(feature = "arbitrary")]
32168    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32169        use arbitrary::{Arbitrary, Unstructured};
32170        let mut buf = [0u8; 1024];
32171        rng.fill_bytes(&mut buf);
32172        let mut unstructured = Unstructured::new(&buf);
32173        Self::arbitrary(&mut unstructured).unwrap_or_default()
32174    }
32175}
32176impl Default for WIFI_CONFIG_AP_DATA {
32177    fn default() -> Self {
32178        Self::DEFAULT.clone()
32179    }
32180}
32181impl MessageData for WIFI_CONFIG_AP_DATA {
32182    type Message = MavMessage;
32183    const ID: u32 = 299u32;
32184    const NAME: &'static str = "WIFI_CONFIG_AP";
32185    const EXTRA_CRC: u8 = 19u8;
32186    const ENCODED_LEN: usize = 98usize;
32187    fn deser(
32188        _version: MavlinkVersion,
32189        __input: &[u8],
32190    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32191        let avail_len = __input.len();
32192        let mut payload_buf = [0; Self::ENCODED_LEN];
32193        let mut buf = if avail_len < Self::ENCODED_LEN {
32194            payload_buf[0..avail_len].copy_from_slice(__input);
32195            Bytes::new(&payload_buf)
32196        } else {
32197            Bytes::new(__input)
32198        };
32199        let mut __struct = Self::default();
32200        for v in &mut __struct.ssid {
32201            let val = buf.get_u8();
32202            *v = val;
32203        }
32204        for v in &mut __struct.password {
32205            let val = buf.get_u8();
32206            *v = val;
32207        }
32208        let tmp = buf.get_i8();
32209        __struct.mode =
32210            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32211                enum_type: "WifiConfigApMode",
32212                value: tmp as u32,
32213            })?;
32214        let tmp = buf.get_i8();
32215        __struct.response =
32216            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32217                enum_type: "WifiConfigApResponse",
32218                value: tmp as u32,
32219            })?;
32220        Ok(__struct)
32221    }
32222    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32223        let mut __tmp = BytesMut::new(bytes);
32224        #[allow(clippy::absurd_extreme_comparisons)]
32225        #[allow(unused_comparisons)]
32226        if __tmp.remaining() < Self::ENCODED_LEN {
32227            panic!(
32228                "buffer is too small (need {} bytes, but got {})",
32229                Self::ENCODED_LEN,
32230                __tmp.remaining(),
32231            )
32232        }
32233        for val in &self.ssid {
32234            __tmp.put_u8(*val);
32235        }
32236        for val in &self.password {
32237            __tmp.put_u8(*val);
32238        }
32239        if matches!(version, MavlinkVersion::V2) {
32240            __tmp.put_i8(self.mode as i8);
32241            __tmp.put_i8(self.response as i8);
32242            let len = __tmp.len();
32243            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32244        } else {
32245            __tmp.len()
32246        }
32247    }
32248}
32249#[doc = "Winch status."]
32250#[doc = ""]
32251#[doc = "ID: 9005"]
32252#[derive(Debug, Clone, PartialEq)]
32253#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32254#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32255#[cfg_attr(feature = "ts", derive(TS))]
32256#[cfg_attr(feature = "ts", ts(export))]
32257pub struct WINCH_STATUS_DATA {
32258    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32259    pub time_usec: u64,
32260    #[doc = "Length of line released. NaN if unknown"]
32261    pub line_length: f32,
32262    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
32263    pub speed: f32,
32264    #[doc = "Tension on the line. NaN if unknown"]
32265    pub tension: f32,
32266    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
32267    pub voltage: f32,
32268    #[doc = "Current draw from the winch. NaN if unknown"]
32269    pub current: f32,
32270    #[doc = "Status flags"]
32271    pub status: MavWinchStatusFlag,
32272    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
32273    pub temperature: i16,
32274}
32275impl WINCH_STATUS_DATA {
32276    pub const ENCODED_LEN: usize = 34usize;
32277    pub const DEFAULT: Self = Self {
32278        time_usec: 0_u64,
32279        line_length: 0.0_f32,
32280        speed: 0.0_f32,
32281        tension: 0.0_f32,
32282        voltage: 0.0_f32,
32283        current: 0.0_f32,
32284        status: MavWinchStatusFlag::DEFAULT,
32285        temperature: 0_i16,
32286    };
32287    #[cfg(feature = "arbitrary")]
32288    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32289        use arbitrary::{Arbitrary, Unstructured};
32290        let mut buf = [0u8; 1024];
32291        rng.fill_bytes(&mut buf);
32292        let mut unstructured = Unstructured::new(&buf);
32293        Self::arbitrary(&mut unstructured).unwrap_or_default()
32294    }
32295}
32296impl Default for WINCH_STATUS_DATA {
32297    fn default() -> Self {
32298        Self::DEFAULT.clone()
32299    }
32300}
32301impl MessageData for WINCH_STATUS_DATA {
32302    type Message = MavMessage;
32303    const ID: u32 = 9005u32;
32304    const NAME: &'static str = "WINCH_STATUS";
32305    const EXTRA_CRC: u8 = 117u8;
32306    const ENCODED_LEN: usize = 34usize;
32307    fn deser(
32308        _version: MavlinkVersion,
32309        __input: &[u8],
32310    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32311        let avail_len = __input.len();
32312        let mut payload_buf = [0; Self::ENCODED_LEN];
32313        let mut buf = if avail_len < Self::ENCODED_LEN {
32314            payload_buf[0..avail_len].copy_from_slice(__input);
32315            Bytes::new(&payload_buf)
32316        } else {
32317            Bytes::new(__input)
32318        };
32319        let mut __struct = Self::default();
32320        __struct.time_usec = buf.get_u64_le();
32321        __struct.line_length = buf.get_f32_le();
32322        __struct.speed = buf.get_f32_le();
32323        __struct.tension = buf.get_f32_le();
32324        __struct.voltage = buf.get_f32_le();
32325        __struct.current = buf.get_f32_le();
32326        let tmp = buf.get_u32_le();
32327        __struct.status = MavWinchStatusFlag::from_bits(tmp & MavWinchStatusFlag::all().bits())
32328            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32329                flag_type: "MavWinchStatusFlag",
32330                value: tmp as u32,
32331            })?;
32332        __struct.temperature = buf.get_i16_le();
32333        Ok(__struct)
32334    }
32335    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32336        let mut __tmp = BytesMut::new(bytes);
32337        #[allow(clippy::absurd_extreme_comparisons)]
32338        #[allow(unused_comparisons)]
32339        if __tmp.remaining() < Self::ENCODED_LEN {
32340            panic!(
32341                "buffer is too small (need {} bytes, but got {})",
32342                Self::ENCODED_LEN,
32343                __tmp.remaining(),
32344            )
32345        }
32346        __tmp.put_u64_le(self.time_usec);
32347        __tmp.put_f32_le(self.line_length);
32348        __tmp.put_f32_le(self.speed);
32349        __tmp.put_f32_le(self.tension);
32350        __tmp.put_f32_le(self.voltage);
32351        __tmp.put_f32_le(self.current);
32352        __tmp.put_u32_le(self.status.bits());
32353        __tmp.put_i16_le(self.temperature);
32354        if matches!(version, MavlinkVersion::V2) {
32355            let len = __tmp.len();
32356            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32357        } else {
32358            __tmp.len()
32359        }
32360    }
32361}
32362#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
32363#[doc = ""]
32364#[doc = "ID: 231"]
32365#[derive(Debug, Clone, PartialEq)]
32366#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32368#[cfg_attr(feature = "ts", derive(TS))]
32369#[cfg_attr(feature = "ts", ts(export))]
32370pub struct WIND_COV_DATA {
32371    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32372    pub time_usec: u64,
32373    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
32374    pub wind_x: f32,
32375    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
32376    pub wind_y: f32,
32377    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
32378    pub wind_z: f32,
32379    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32380    pub var_horiz: f32,
32381    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32382    pub var_vert: f32,
32383    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
32384    pub wind_alt: f32,
32385    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
32386    pub horiz_accuracy: f32,
32387    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
32388    pub vert_accuracy: f32,
32389}
32390impl WIND_COV_DATA {
32391    pub const ENCODED_LEN: usize = 40usize;
32392    pub const DEFAULT: Self = Self {
32393        time_usec: 0_u64,
32394        wind_x: 0.0_f32,
32395        wind_y: 0.0_f32,
32396        wind_z: 0.0_f32,
32397        var_horiz: 0.0_f32,
32398        var_vert: 0.0_f32,
32399        wind_alt: 0.0_f32,
32400        horiz_accuracy: 0.0_f32,
32401        vert_accuracy: 0.0_f32,
32402    };
32403    #[cfg(feature = "arbitrary")]
32404    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32405        use arbitrary::{Arbitrary, Unstructured};
32406        let mut buf = [0u8; 1024];
32407        rng.fill_bytes(&mut buf);
32408        let mut unstructured = Unstructured::new(&buf);
32409        Self::arbitrary(&mut unstructured).unwrap_or_default()
32410    }
32411}
32412impl Default for WIND_COV_DATA {
32413    fn default() -> Self {
32414        Self::DEFAULT.clone()
32415    }
32416}
32417impl MessageData for WIND_COV_DATA {
32418    type Message = MavMessage;
32419    const ID: u32 = 231u32;
32420    const NAME: &'static str = "WIND_COV";
32421    const EXTRA_CRC: u8 = 105u8;
32422    const ENCODED_LEN: usize = 40usize;
32423    fn deser(
32424        _version: MavlinkVersion,
32425        __input: &[u8],
32426    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32427        let avail_len = __input.len();
32428        let mut payload_buf = [0; Self::ENCODED_LEN];
32429        let mut buf = if avail_len < Self::ENCODED_LEN {
32430            payload_buf[0..avail_len].copy_from_slice(__input);
32431            Bytes::new(&payload_buf)
32432        } else {
32433            Bytes::new(__input)
32434        };
32435        let mut __struct = Self::default();
32436        __struct.time_usec = buf.get_u64_le();
32437        __struct.wind_x = buf.get_f32_le();
32438        __struct.wind_y = buf.get_f32_le();
32439        __struct.wind_z = buf.get_f32_le();
32440        __struct.var_horiz = buf.get_f32_le();
32441        __struct.var_vert = buf.get_f32_le();
32442        __struct.wind_alt = buf.get_f32_le();
32443        __struct.horiz_accuracy = buf.get_f32_le();
32444        __struct.vert_accuracy = buf.get_f32_le();
32445        Ok(__struct)
32446    }
32447    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32448        let mut __tmp = BytesMut::new(bytes);
32449        #[allow(clippy::absurd_extreme_comparisons)]
32450        #[allow(unused_comparisons)]
32451        if __tmp.remaining() < Self::ENCODED_LEN {
32452            panic!(
32453                "buffer is too small (need {} bytes, but got {})",
32454                Self::ENCODED_LEN,
32455                __tmp.remaining(),
32456            )
32457        }
32458        __tmp.put_u64_le(self.time_usec);
32459        __tmp.put_f32_le(self.wind_x);
32460        __tmp.put_f32_le(self.wind_y);
32461        __tmp.put_f32_le(self.wind_z);
32462        __tmp.put_f32_le(self.var_horiz);
32463        __tmp.put_f32_le(self.var_vert);
32464        __tmp.put_f32_le(self.wind_alt);
32465        __tmp.put_f32_le(self.horiz_accuracy);
32466        __tmp.put_f32_le(self.vert_accuracy);
32467        if matches!(version, MavlinkVersion::V2) {
32468            let len = __tmp.len();
32469            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32470        } else {
32471            __tmp.len()
32472        }
32473    }
32474}
32475#[derive(Clone, PartialEq, Debug)]
32476#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32477#[cfg_attr(feature = "serde", serde(tag = "type"))]
32478#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32479#[cfg_attr(feature = "ts", derive(TS))]
32480#[cfg_attr(feature = "ts", ts(export))]
32481#[repr(u32)]
32482pub enum MavMessage {
32483    #[doc = "Set the vehicle attitude and body angular rates."]
32484    #[doc = ""]
32485    #[doc = "ID: 140"]
32486    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
32487    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
32488    #[doc = ""]
32489    #[doc = "ID: 375"]
32490    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
32491    #[doc = "The location and information of an ADSB vehicle."]
32492    #[doc = ""]
32493    #[doc = "ID: 246"]
32494    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
32495    #[doc = "The location and information of an AIS vessel."]
32496    #[doc = ""]
32497    #[doc = "ID: 301"]
32498    AIS_VESSEL(AIS_VESSEL_DATA),
32499    #[doc = "The current system altitude."]
32500    #[doc = ""]
32501    #[doc = "ID: 141"]
32502    ALTITUDE(ALTITUDE_DATA),
32503    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
32504    #[doc = ""]
32505    #[doc = "ID: 30"]
32506    ATTITUDE(ATTITUDE_DATA),
32507    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32508    #[doc = ""]
32509    #[doc = "ID: 31"]
32510    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
32511    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32512    #[doc = ""]
32513    #[doc = "ID: 61"]
32514    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
32515    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
32516    #[doc = ""]
32517    #[doc = "ID: 83"]
32518    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
32519    #[doc = "Motion capture attitude and position."]
32520    #[doc = ""]
32521    #[doc = "ID: 138"]
32522    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
32523    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
32524    #[doc = ""]
32525    #[doc = "ID: 7"]
32526    AUTH_KEY(AUTH_KEY_DATA),
32527    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
32528    #[doc = ""]
32529    #[doc = "ID: 286"]
32530    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
32531    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
32532    #[doc = ""]
32533    #[doc = "ID: 148"]
32534    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
32535    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
32536    #[doc = ""]
32537    #[doc = "ID: 435"]
32538    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
32539    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
32540    #[doc = ""]
32541    #[doc = "ID: 437"]
32542    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
32543    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
32544    #[doc = ""]
32545    #[doc = "ID: 372"]
32546    BATTERY_INFO(BATTERY_INFO_DATA),
32547    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
32548    #[doc = ""]
32549    #[doc = "ID: 147"]
32550    BATTERY_STATUS(BATTERY_STATUS_DATA),
32551    #[doc = "Report button state change."]
32552    #[doc = ""]
32553    #[doc = "ID: 257"]
32554    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
32555    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32556    #[doc = ""]
32557    #[doc = "ID: 262"]
32558    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
32559    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32560    #[doc = ""]
32561    #[doc = "ID: 271"]
32562    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
32563    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
32564    #[doc = ""]
32565    #[doc = "ID: 263"]
32566    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
32567    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32568    #[doc = ""]
32569    #[doc = "ID: 259"]
32570    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
32571    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32572    #[doc = ""]
32573    #[doc = "ID: 260"]
32574    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
32575    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
32576    #[doc = ""]
32577    #[doc = "ID: 277"]
32578    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
32579    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32580    #[doc = ""]
32581    #[doc = "ID: 276"]
32582    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
32583    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32584    #[doc = ""]
32585    #[doc = "ID: 275"]
32586    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
32587    #[doc = "Camera-IMU triggering and synchronisation message."]
32588    #[doc = ""]
32589    #[doc = "ID: 112"]
32590    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
32591    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
32592    #[doc = ""]
32593    #[doc = "ID: 387"]
32594    CANFD_FRAME(CANFD_FRAME_DATA),
32595    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
32596    #[doc = ""]
32597    #[doc = "ID: 388"]
32598    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
32599    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
32600    #[doc = ""]
32601    #[doc = "ID: 386"]
32602    CAN_FRAME(CAN_FRAME_DATA),
32603    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32604    #[doc = ""]
32605    #[doc = "ID: 336"]
32606    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
32607    #[doc = "Report current used cellular network status."]
32608    #[doc = ""]
32609    #[doc = "ID: 334"]
32610    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
32611    #[doc = "Request to control this MAV."]
32612    #[doc = ""]
32613    #[doc = "ID: 5"]
32614    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
32615    #[doc = "Accept / deny control of this MAV."]
32616    #[doc = ""]
32617    #[doc = "ID: 6"]
32618    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
32619    #[doc = "Information about a potential collision."]
32620    #[doc = ""]
32621    #[doc = "ID: 247"]
32622    COLLISION(COLLISION_DATA),
32623    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32624    #[doc = ""]
32625    #[doc = "ID: 77"]
32626    COMMAND_ACK(COMMAND_ACK_DATA),
32627    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32628    #[doc = ""]
32629    #[doc = "ID: 80"]
32630    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
32631    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32632    #[doc = ""]
32633    #[doc = "ID: 75"]
32634    COMMAND_INT(COMMAND_INT_DATA),
32635    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32636    #[doc = ""]
32637    #[doc = "ID: 76"]
32638    COMMAND_LONG(COMMAND_LONG_DATA),
32639    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
32640    #[doc = ""]
32641    #[doc = "ID: 395"]
32642    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
32643    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
32644    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
32645    #[doc = ""]
32646    #[doc = "ID: 396"]
32647    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
32648    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
32649    #[doc = ""]
32650    #[doc = "ID: 397"]
32651    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
32652    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
32653    #[doc = ""]
32654    #[doc = "ID: 146"]
32655    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
32656    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
32657    #[doc = ""]
32658    #[doc = "ID: 411"]
32659    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
32660    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
32661    #[doc = ""]
32662    #[doc = "ID: 436"]
32663    CURRENT_MODE(CURRENT_MODE_DATA),
32664    #[doc = "Data stream status information."]
32665    #[doc = ""]
32666    #[doc = "ID: 67"]
32667    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
32668    DATA_STREAM(DATA_STREAM_DATA),
32669    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32670    #[doc = ""]
32671    #[doc = "ID: 130"]
32672    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
32673    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
32674    #[doc = ""]
32675    #[doc = "ID: 254"]
32676    DEBUG(DEBUG_DATA),
32677    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
32678    #[doc = ""]
32679    #[doc = "ID: 350"]
32680    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
32681    #[doc = "To debug something using a named 3D vector."]
32682    #[doc = ""]
32683    #[doc = "ID: 250"]
32684    DEBUG_VECT(DEBUG_VECT_DATA),
32685    #[doc = "Distance sensor information for an onboard rangefinder."]
32686    #[doc = ""]
32687    #[doc = "ID: 132"]
32688    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
32689    #[doc = "EFI status output."]
32690    #[doc = ""]
32691    #[doc = "ID: 225"]
32692    EFI_STATUS(EFI_STATUS_DATA),
32693    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32694    #[doc = ""]
32695    #[doc = "ID: 131"]
32696    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
32697    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
32698    #[doc = ""]
32699    #[doc = "ID: 290"]
32700    ESC_INFO(ESC_INFO_DATA),
32701    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
32702    #[doc = ""]
32703    #[doc = "ID: 291"]
32704    ESC_STATUS(ESC_STATUS_DATA),
32705    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
32706    #[doc = ""]
32707    #[doc = "ID: 230"]
32708    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
32709    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
32710    #[doc = ""]
32711    #[doc = "ID: 410"]
32712    EVENT(EVENT_DATA),
32713    #[doc = "Provides state for additional features."]
32714    #[doc = ""]
32715    #[doc = "ID: 245"]
32716    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
32717    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
32718    #[doc = ""]
32719    #[doc = "ID: 162"]
32720    FENCE_STATUS(FENCE_STATUS_DATA),
32721    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
32722    #[doc = ""]
32723    #[doc = "ID: 110"]
32724    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
32725    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
32726    #[doc = ""]
32727    #[doc = "ID: 264"]
32728    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
32729    #[doc = "Current motion information from a designated system."]
32730    #[doc = ""]
32731    #[doc = "ID: 144"]
32732    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
32733    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
32734    #[doc = ""]
32735    #[doc = "ID: 371"]
32736    FUEL_STATUS(FUEL_STATUS_DATA),
32737    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
32738    #[doc = ""]
32739    #[doc = "ID: 373"]
32740    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
32741    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
32742    #[doc = ""]
32743    #[doc = "ID: 285"]
32744    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
32745    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
32746    #[doc = ""]
32747    #[doc = "ID: 283"]
32748    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
32749    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
32750    #[doc = ""]
32751    #[doc = "ID: 284"]
32752    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
32753    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
32754    #[doc = ""]
32755    #[doc = "ID: 280"]
32756    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
32757    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32758    #[doc = ""]
32759    #[doc = "ID: 282"]
32760    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
32761    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32762    #[doc = ""]
32763    #[doc = "ID: 288"]
32764    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
32765    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
32766    #[doc = ""]
32767    #[doc = "ID: 287"]
32768    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
32769    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
32770    #[doc = ""]
32771    #[doc = "ID: 281"]
32772    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
32773    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
32774    #[doc = ""]
32775    #[doc = "ID: 33"]
32776    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
32777    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
32778    #[doc = ""]
32779    #[doc = "ID: 63"]
32780    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
32781    #[doc = "Global position/attitude estimate from a vision source."]
32782    #[doc = ""]
32783    #[doc = "ID: 101"]
32784    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
32785    #[doc = "Second GPS data."]
32786    #[doc = ""]
32787    #[doc = "ID: 124"]
32788    GPS2_RAW(GPS2_RAW_DATA),
32789    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32790    #[doc = ""]
32791    #[doc = "ID: 128"]
32792    GPS2_RTK(GPS2_RTK_DATA),
32793    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
32794    #[doc = ""]
32795    #[doc = "ID: 49"]
32796    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
32797    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
32798    #[doc = ""]
32799    #[doc = "ID: 123"]
32800    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
32801    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
32802    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
32803    #[doc = ""]
32804    #[doc = "ID: 232"]
32805    GPS_INPUT(GPS_INPUT_DATA),
32806    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32807    #[doc = ""]
32808    #[doc = "ID: 24"]
32809    GPS_RAW_INT(GPS_RAW_INT_DATA),
32810    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
32811    #[doc = ""]
32812    #[doc = "ID: 233"]
32813    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
32814    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32815    #[doc = ""]
32816    #[doc = "ID: 127"]
32817    GPS_RTK(GPS_RTK_DATA),
32818    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
32819    #[doc = ""]
32820    #[doc = "ID: 25"]
32821    GPS_STATUS(GPS_STATUS_DATA),
32822    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
32823    #[doc = ""]
32824    #[doc = "ID: 0"]
32825    HEARTBEAT(HEARTBEAT_DATA),
32826    #[doc = "The IMU readings in SI units in NED body frame."]
32827    #[doc = ""]
32828    #[doc = "ID: 105"]
32829    HIGHRES_IMU(HIGHRES_IMU_DATA),
32830    #[doc = "Message appropriate for high latency connections like Iridium."]
32831    #[doc = ""]
32832    #[doc = "ID: 234"]
32833    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
32834    HIGH_LATENCY(HIGH_LATENCY_DATA),
32835    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
32836    #[doc = ""]
32837    #[doc = "ID: 235"]
32838    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
32839    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
32840    #[doc = ""]
32841    #[doc = "ID: 93"]
32842    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
32843    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
32844    #[doc = ""]
32845    #[doc = "ID: 91"]
32846    HIL_CONTROLS(HIL_CONTROLS_DATA),
32847    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32848    #[doc = ""]
32849    #[doc = "ID: 113"]
32850    HIL_GPS(HIL_GPS_DATA),
32851    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
32852    #[doc = ""]
32853    #[doc = "ID: 114"]
32854    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
32855    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
32856    #[doc = ""]
32857    #[doc = "ID: 92"]
32858    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
32859    #[doc = "The IMU readings in SI units in NED body frame."]
32860    #[doc = ""]
32861    #[doc = "ID: 107"]
32862    HIL_SENSOR(HIL_SENSOR_DATA),
32863    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32864    #[doc = ""]
32865    #[doc = "ID: 90"]
32866    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
32867    HIL_STATE(HIL_STATE_DATA),
32868    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32869    #[doc = ""]
32870    #[doc = "ID: 115"]
32871    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
32872    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
32873    #[doc = ""]
32874    #[doc = "ID: 242"]
32875    HOME_POSITION(HOME_POSITION_DATA),
32876    #[doc = "Temperature and humidity from hygrometer."]
32877    #[doc = ""]
32878    #[doc = "ID: 12920"]
32879    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
32880    #[doc = "Illuminator status."]
32881    #[doc = ""]
32882    #[doc = "ID: 440"]
32883    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
32884    #[doc = "Status of the Iridium SBD link."]
32885    #[doc = ""]
32886    #[doc = "ID: 335"]
32887    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
32888    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
32889    #[doc = ""]
32890    #[doc = "ID: 149"]
32891    LANDING_TARGET(LANDING_TARGET_DATA),
32892    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
32893    #[doc = ""]
32894    #[doc = "ID: 8"]
32895    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
32896    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32897    #[doc = ""]
32898    #[doc = "ID: 32"]
32899    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
32900    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32901    #[doc = ""]
32902    #[doc = "ID: 64"]
32903    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
32904    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32905    #[doc = ""]
32906    #[doc = "ID: 89"]
32907    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
32908    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
32909    #[doc = ""]
32910    #[doc = "ID: 268"]
32911    LOGGING_ACK(LOGGING_ACK_DATA),
32912    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
32913    #[doc = ""]
32914    #[doc = "ID: 266"]
32915    LOGGING_DATA(LOGGING_DATA_DATA),
32916    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
32917    #[doc = ""]
32918    #[doc = "ID: 267"]
32919    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
32920    #[doc = "Reply to LOG_REQUEST_DATA."]
32921    #[doc = ""]
32922    #[doc = "ID: 120"]
32923    LOG_DATA(LOG_DATA_DATA),
32924    #[doc = "Reply to LOG_REQUEST_LIST."]
32925    #[doc = ""]
32926    #[doc = "ID: 118"]
32927    LOG_ENTRY(LOG_ENTRY_DATA),
32928    #[doc = "Erase all logs."]
32929    #[doc = ""]
32930    #[doc = "ID: 121"]
32931    LOG_ERASE(LOG_ERASE_DATA),
32932    #[doc = "Request a chunk of a log."]
32933    #[doc = ""]
32934    #[doc = "ID: 119"]
32935    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
32936    #[doc = "Stop log transfer and resume normal logging."]
32937    #[doc = ""]
32938    #[doc = "ID: 122"]
32939    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
32940    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
32941    #[doc = ""]
32942    #[doc = "ID: 117"]
32943    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
32944    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
32945    #[doc = ""]
32946    #[doc = "ID: 192"]
32947    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
32948    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
32949    #[doc = ""]
32950    #[doc = "ID: 69"]
32951    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
32952    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
32953    #[doc = ""]
32954    #[doc = "ID: 81"]
32955    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
32956    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
32957    #[doc = ""]
32958    #[doc = "ID: 249"]
32959    MEMORY_VECT(MEMORY_VECT_DATA),
32960    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
32961    #[doc = ""]
32962    #[doc = "ID: 244"]
32963    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
32964    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
32965    #[doc = ""]
32966    #[doc = "ID: 47"]
32967    MISSION_ACK(MISSION_ACK_DATA),
32968    #[doc = "Delete all mission items at once."]
32969    #[doc = ""]
32970    #[doc = "ID: 45"]
32971    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
32972    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
32973    #[doc = ""]
32974    #[doc = "ID: 44"]
32975    MISSION_COUNT(MISSION_COUNT_DATA),
32976    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
32977    #[doc = ""]
32978    #[doc = "ID: 42"]
32979    MISSION_CURRENT(MISSION_CURRENT_DATA),
32980    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
32981    #[doc = ""]
32982    #[doc = "ID: 39"]
32983    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
32984    MISSION_ITEM(MISSION_ITEM_DATA),
32985    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
32986    #[doc = ""]
32987    #[doc = "ID: 73"]
32988    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
32989    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
32990    #[doc = ""]
32991    #[doc = "ID: 46"]
32992    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
32993    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
32994    #[doc = ""]
32995    #[doc = "ID: 40"]
32996    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
32997    MISSION_REQUEST(MISSION_REQUEST_DATA),
32998    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
32999    #[doc = ""]
33000    #[doc = "ID: 51"]
33001    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
33002    #[doc = "Request the overall list of mission items from the system/component."]
33003    #[doc = ""]
33004    #[doc = "ID: 43"]
33005    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
33006    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
33007    #[doc = ""]
33008    #[doc = "ID: 37"]
33009    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
33010    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
33011    #[doc = ""]
33012    #[doc = "ID: 41"]
33013    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
33014    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
33015    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
33016    #[doc = ""]
33017    #[doc = "ID: 38"]
33018    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
33019    #[doc = "Orientation of a mount."]
33020    #[doc = ""]
33021    #[doc = "ID: 265"]
33022    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
33023    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
33024    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33025    #[doc = ""]
33026    #[doc = "ID: 251"]
33027    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
33028    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33029    #[doc = ""]
33030    #[doc = "ID: 252"]
33031    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
33032    #[doc = "The state of the navigation and position controller."]
33033    #[doc = ""]
33034    #[doc = "ID: 62"]
33035    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
33036    #[doc = "Accelerometer and Gyro biases from the navigation filter."]
33037    #[doc = ""]
33038    #[doc = "ID: 220"]
33039    NAV_FILTER_BIAS(NAV_FILTER_BIAS_DATA),
33040    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
33041    #[doc = ""]
33042    #[doc = "ID: 330"]
33043    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
33044    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
33045    #[doc = ""]
33046    #[doc = "ID: 331"]
33047    ODOMETRY(ODOMETRY_DATA),
33048    #[doc = "Hardware status sent by an onboard computer."]
33049    #[doc = ""]
33050    #[doc = "ID: 390"]
33051    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
33052    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
33053    #[doc = ""]
33054    #[doc = "ID: 12918"]
33055    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
33056    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
33057    #[doc = ""]
33058    #[doc = "ID: 12902"]
33059    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
33060    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
33061    #[doc = ""]
33062    #[doc = "ID: 12900"]
33063    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
33064    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
33065    #[doc = ""]
33066    #[doc = "ID: 12901"]
33067    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
33068    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
33069    #[doc = ""]
33070    #[doc = "ID: 12915"]
33071    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
33072    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
33073    #[doc = ""]
33074    #[doc = "ID: 12905"]
33075    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
33076    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
33077    #[doc = ""]
33078    #[doc = "ID: 12903"]
33079    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
33080    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
33081    #[doc = ""]
33082    #[doc = "ID: 12904"]
33083    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
33084    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
33085    #[doc = ""]
33086    #[doc = "ID: 12919"]
33087    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
33088    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
33089    #[doc = ""]
33090    #[doc = "ID: 100"]
33091    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
33092    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
33093    #[doc = ""]
33094    #[doc = "ID: 106"]
33095    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
33096    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
33097    #[doc = ""]
33098    #[doc = "ID: 360"]
33099    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
33100    #[doc = "Response from a PARAM_EXT_SET message."]
33101    #[doc = ""]
33102    #[doc = "ID: 324"]
33103    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
33104    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
33105    #[doc = ""]
33106    #[doc = "ID: 321"]
33107    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
33108    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
33109    #[doc = ""]
33110    #[doc = "ID: 320"]
33111    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
33112    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
33113    #[doc = ""]
33114    #[doc = "ID: 323"]
33115    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
33116    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
33117    #[doc = ""]
33118    #[doc = "ID: 322"]
33119    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
33120    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
33121    #[doc = ""]
33122    #[doc = "ID: 50"]
33123    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
33124    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33125    #[doc = ""]
33126    #[doc = "ID: 21"]
33127    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
33128    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
33129    #[doc = ""]
33130    #[doc = "ID: 20"]
33131    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
33132    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33133    #[doc = ""]
33134    #[doc = "ID: 23"]
33135    PARAM_SET(PARAM_SET_DATA),
33136    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33137    #[doc = ""]
33138    #[doc = "ID: 22"]
33139    PARAM_VALUE(PARAM_VALUE_DATA),
33140    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
33141    #[doc = ""]
33142    #[doc = "ID: 4"]
33143    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
33144    PING(PING_DATA),
33145    #[doc = "Control vehicle tone generation (buzzer)."]
33146    #[doc = ""]
33147    #[doc = "ID: 258"]
33148    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
33149    PLAY_TUNE(PLAY_TUNE_DATA),
33150    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
33151    #[doc = ""]
33152    #[doc = "ID: 400"]
33153    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
33154    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
33155    #[doc = ""]
33156    #[doc = "ID: 87"]
33157    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
33158    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
33159    #[doc = ""]
33160    #[doc = "ID: 85"]
33161    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
33162    #[doc = "Power supply status."]
33163    #[doc = ""]
33164    #[doc = "ID: 125"]
33165    POWER_STATUS(POWER_STATUS_DATA),
33166    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
33167    #[doc = ""]
33168    #[doc = "ID: 300"]
33169    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
33170    #[doc = "Complete set of calibration parameters for the radio."]
33171    #[doc = ""]
33172    #[doc = "ID: 221"]
33173    RADIO_CALIBRATION(RADIO_CALIBRATION_DATA),
33174    #[doc = "Status generated by radio and injected into MAVLink stream."]
33175    #[doc = ""]
33176    #[doc = "ID: 109"]
33177    RADIO_STATUS(RADIO_STATUS_DATA),
33178    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
33179    #[doc = ""]
33180    #[doc = "ID: 27"]
33181    RAW_IMU(RAW_IMU_DATA),
33182    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
33183    #[doc = ""]
33184    #[doc = "ID: 28"]
33185    RAW_PRESSURE(RAW_PRESSURE_DATA),
33186    #[doc = "RPM sensor data message."]
33187    #[doc = ""]
33188    #[doc = "ID: 339"]
33189    RAW_RPM(RAW_RPM_DATA),
33190    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33191    #[doc = ""]
33192    #[doc = "ID: 65"]
33193    RC_CHANNELS(RC_CHANNELS_DATA),
33194    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
33195    #[doc = ""]
33196    #[doc = "ID: 70"]
33197    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
33198    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33199    #[doc = ""]
33200    #[doc = "ID: 35"]
33201    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
33202    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
33203    #[doc = ""]
33204    #[doc = "ID: 34"]
33205    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
33206    #[doc = "Request a data stream."]
33207    #[doc = ""]
33208    #[doc = "ID: 66"]
33209    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
33210    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
33211    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
33212    #[doc = ""]
33213    #[doc = "ID: 412"]
33214    REQUEST_EVENT(REQUEST_EVENT_DATA),
33215    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
33216    #[doc = ""]
33217    #[doc = "ID: 142"]
33218    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
33219    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
33220    #[doc = ""]
33221    #[doc = "ID: 413"]
33222    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
33223    #[doc = "Read out the safety zone the MAV currently assumes."]
33224    #[doc = ""]
33225    #[doc = "ID: 55"]
33226    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
33227    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
33228    #[doc = ""]
33229    #[doc = "ID: 54"]
33230    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
33231    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
33232    #[doc = ""]
33233    #[doc = "ID: 26"]
33234    SCALED_IMU(SCALED_IMU_DATA),
33235    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
33236    #[doc = ""]
33237    #[doc = "ID: 116"]
33238    SCALED_IMU2(SCALED_IMU2_DATA),
33239    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
33240    #[doc = ""]
33241    #[doc = "ID: 129"]
33242    SCALED_IMU3(SCALED_IMU3_DATA),
33243    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
33244    #[doc = ""]
33245    #[doc = "ID: 29"]
33246    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
33247    #[doc = "Barometer readings for 2nd barometer."]
33248    #[doc = ""]
33249    #[doc = "ID: 137"]
33250    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
33251    #[doc = "Barometer readings for 3rd barometer."]
33252    #[doc = ""]
33253    #[doc = "ID: 143"]
33254    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
33255    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
33256    #[doc = ""]
33257    #[doc = "ID: 126"]
33258    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
33259    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
33260    #[doc = ""]
33261    #[doc = "ID: 36"]
33262    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
33263    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
33264    #[doc = ""]
33265    #[doc = "ID: 256"]
33266    SETUP_SIGNING(SETUP_SIGNING_DATA),
33267    #[doc = "Set the vehicle attitude and body angular rates."]
33268    #[doc = ""]
33269    #[doc = "ID: 139"]
33270    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
33271    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
33272    #[doc = ""]
33273    #[doc = "ID: 82"]
33274    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
33275    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
33276    #[doc = ""]
33277    #[doc = "ID: 48"]
33278    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
33279    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
33280    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
33281    #[doc = ""]
33282    #[doc = "ID: 243"]
33283    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
33284    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
33285    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
33286    #[doc = ""]
33287    #[doc = "ID: 11"]
33288    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
33289    SET_MODE(SET_MODE_DATA),
33290    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
33291    #[doc = ""]
33292    #[doc = "ID: 86"]
33293    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
33294    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
33295    #[doc = ""]
33296    #[doc = "ID: 84"]
33297    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
33298    #[doc = "Status of simulation environment, if used."]
33299    #[doc = ""]
33300    #[doc = "ID: 108"]
33301    SIM_STATE(SIM_STATE_DATA),
33302    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
33303    #[doc = ""]
33304    #[doc = "ID: 370"]
33305    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
33306    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
33307    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
33308    #[doc = ""]
33309    #[doc = "ID: 253"]
33310    STATUSTEXT(STATUSTEXT_DATA),
33311    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
33312    #[doc = ""]
33313    #[doc = "ID: 261"]
33314    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
33315    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
33316    #[doc = ""]
33317    #[doc = "ID: 401"]
33318    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
33319    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
33320    #[doc = ""]
33321    #[doc = "ID: 2"]
33322    SYSTEM_TIME(SYSTEM_TIME_DATA),
33323    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
33324    #[doc = ""]
33325    #[doc = "ID: 1"]
33326    SYS_STATUS(SYS_STATUS_DATA),
33327    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
33328    #[doc = ""]
33329    #[doc = "ID: 135"]
33330    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
33331    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33332    #[doc = ""]
33333    #[doc = "ID: 134"]
33334    TERRAIN_DATA(TERRAIN_DATA_DATA),
33335    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33336    #[doc = ""]
33337    #[doc = "ID: 136"]
33338    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
33339    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33340    #[doc = ""]
33341    #[doc = "ID: 133"]
33342    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
33343    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
33344    #[doc = ""]
33345    #[doc = "ID: 111"]
33346    TIMESYNC(TIMESYNC_DATA),
33347    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
33348    #[doc = ""]
33349    #[doc = "ID: 380"]
33350    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
33351    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
33352    #[doc = ""]
33353    #[doc = "ID: 333"]
33354    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
33355    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
33356    #[doc = ""]
33357    #[doc = "ID: 332"]
33358    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
33359    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
33360    #[doc = ""]
33361    #[doc = "ID: 385"]
33362    TUNNEL(TUNNEL_DATA),
33363    #[doc = "System status specific to ualberta uav."]
33364    #[doc = ""]
33365    #[doc = "ID: 222"]
33366    UALBERTA_SYS_STATUS(UALBERTA_SYS_STATUS_DATA),
33367    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
33368    #[doc = ""]
33369    #[doc = "ID: 311"]
33370    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
33371    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
33372    #[doc = ""]
33373    #[doc = "ID: 310"]
33374    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
33375    #[doc = "The global position resulting from GPS and sensor fusion."]
33376    #[doc = ""]
33377    #[doc = "ID: 340"]
33378    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
33379    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
33380    #[doc = ""]
33381    #[doc = "ID: 248"]
33382    V2_EXTENSION(V2_EXTENSION_DATA),
33383    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
33384    #[doc = ""]
33385    #[doc = "ID: 74"]
33386    VFR_HUD(VFR_HUD_DATA),
33387    #[doc = "Vibration levels and accelerometer clipping."]
33388    #[doc = ""]
33389    #[doc = "ID: 241"]
33390    VIBRATION(VIBRATION_DATA),
33391    #[doc = "Global position estimate from a Vicon motion system source."]
33392    #[doc = ""]
33393    #[doc = "ID: 104"]
33394    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
33395    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
33396    #[doc = ""]
33397    #[doc = "ID: 269"]
33398    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
33399    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
33400    #[doc = ""]
33401    #[doc = "ID: 270"]
33402    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
33403    #[doc = "Local position/attitude estimate from a vision source."]
33404    #[doc = ""]
33405    #[doc = "ID: 102"]
33406    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
33407    #[doc = "Speed estimate from a vision source."]
33408    #[doc = ""]
33409    #[doc = "ID: 103"]
33410    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
33411    #[doc = "Cumulative distance traveled for each reported wheel."]
33412    #[doc = ""]
33413    #[doc = "ID: 9000"]
33414    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
33415    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33416    #[doc = ""]
33417    #[doc = "ID: 299"]
33418    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
33419    #[doc = "Winch status."]
33420    #[doc = ""]
33421    #[doc = "ID: 9005"]
33422    WINCH_STATUS(WINCH_STATUS_DATA),
33423    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
33424    #[doc = ""]
33425    #[doc = "ID: 231"]
33426    WIND_COV(WIND_COV_DATA),
33427}
33428impl MavMessage {
33429    pub const fn all_ids() -> &'static [u32] {
33430        &[
33431            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
33432            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
33433            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
33434            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
33435            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
33436            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
33437            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
33438            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
33439            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
33440            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
33441            148u32, 149u32, 162u32, 192u32, 220u32, 221u32, 222u32, 225u32, 230u32, 231u32, 232u32,
33442            233u32, 234u32, 235u32, 241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32,
33443            249u32, 250u32, 251u32, 252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32,
33444            261u32, 262u32, 263u32, 264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32,
33445            275u32, 276u32, 277u32, 280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32,
33446            288u32, 290u32, 291u32, 299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32,
33447            323u32, 324u32, 330u32, 331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32,
33448            350u32, 360u32, 370u32, 371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32,
33449            388u32, 390u32, 395u32, 396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32,
33450            435u32, 436u32, 437u32, 440u32, 9000u32, 9005u32, 12900u32, 12901u32, 12902u32,
33451            12903u32, 12904u32, 12905u32, 12915u32, 12918u32, 12919u32, 12920u32,
33452        ]
33453    }
33454}
33455impl Message for MavMessage {
33456    fn parse(
33457        version: MavlinkVersion,
33458        id: u32,
33459        payload: &[u8],
33460    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33461        match id {
33462            ACTUATOR_CONTROL_TARGET_DATA::ID => {
33463                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
33464                    .map(Self::ACTUATOR_CONTROL_TARGET)
33465            }
33466            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
33467                .map(Self::ACTUATOR_OUTPUT_STATUS),
33468            ADSB_VEHICLE_DATA::ID => {
33469                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
33470            }
33471            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
33472            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
33473            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
33474            ATTITUDE_QUATERNION_DATA::ID => {
33475                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
33476            }
33477            ATTITUDE_QUATERNION_COV_DATA::ID => {
33478                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
33479                    .map(Self::ATTITUDE_QUATERNION_COV)
33480            }
33481            ATTITUDE_TARGET_DATA::ID => {
33482                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
33483            }
33484            ATT_POS_MOCAP_DATA::ID => {
33485                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
33486            }
33487            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
33488            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33489                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
33490                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
33491            }
33492            AUTOPILOT_VERSION_DATA::ID => {
33493                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
33494            }
33495            AVAILABLE_MODES_DATA::ID => {
33496                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
33497            }
33498            AVAILABLE_MODES_MONITOR_DATA::ID => {
33499                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
33500                    .map(Self::AVAILABLE_MODES_MONITOR)
33501            }
33502            BATTERY_INFO_DATA::ID => {
33503                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
33504            }
33505            BATTERY_STATUS_DATA::ID => {
33506                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
33507            }
33508            BUTTON_CHANGE_DATA::ID => {
33509                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
33510            }
33511            CAMERA_CAPTURE_STATUS_DATA::ID => {
33512                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
33513            }
33514            CAMERA_FOV_STATUS_DATA::ID => {
33515                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
33516            }
33517            CAMERA_IMAGE_CAPTURED_DATA::ID => {
33518                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
33519            }
33520            CAMERA_INFORMATION_DATA::ID => {
33521                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
33522            }
33523            CAMERA_SETTINGS_DATA::ID => {
33524                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
33525            }
33526            CAMERA_THERMAL_RANGE_DATA::ID => {
33527                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
33528            }
33529            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
33530                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
33531                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
33532            }
33533            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
33534                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
33535                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
33536            }
33537            CAMERA_TRIGGER_DATA::ID => {
33538                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
33539            }
33540            CANFD_FRAME_DATA::ID => {
33541                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
33542            }
33543            CAN_FILTER_MODIFY_DATA::ID => {
33544                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
33545            }
33546            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
33547            CELLULAR_CONFIG_DATA::ID => {
33548                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
33549            }
33550            CELLULAR_STATUS_DATA::ID => {
33551                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
33552            }
33553            CHANGE_OPERATOR_CONTROL_DATA::ID => {
33554                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
33555                    .map(Self::CHANGE_OPERATOR_CONTROL)
33556            }
33557            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
33558                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
33559                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
33560            }
33561            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
33562            COMMAND_ACK_DATA::ID => {
33563                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
33564            }
33565            COMMAND_CANCEL_DATA::ID => {
33566                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
33567            }
33568            COMMAND_INT_DATA::ID => {
33569                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
33570            }
33571            COMMAND_LONG_DATA::ID => {
33572                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
33573            }
33574            COMPONENT_INFORMATION_DATA::ID => {
33575                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
33576            }
33577            COMPONENT_INFORMATION_BASIC_DATA::ID => {
33578                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
33579                    .map(Self::COMPONENT_INFORMATION_BASIC)
33580            }
33581            COMPONENT_METADATA_DATA::ID => {
33582                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
33583            }
33584            CONTROL_SYSTEM_STATE_DATA::ID => {
33585                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
33586            }
33587            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
33588                .map(Self::CURRENT_EVENT_SEQUENCE),
33589            CURRENT_MODE_DATA::ID => {
33590                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
33591            }
33592            DATA_STREAM_DATA::ID => {
33593                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
33594            }
33595            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
33596                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
33597                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
33598            }
33599            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
33600            DEBUG_FLOAT_ARRAY_DATA::ID => {
33601                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
33602            }
33603            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
33604            DISTANCE_SENSOR_DATA::ID => {
33605                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
33606            }
33607            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
33608            ENCAPSULATED_DATA_DATA::ID => {
33609                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
33610            }
33611            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
33612            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
33613            ESTIMATOR_STATUS_DATA::ID => {
33614                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
33615            }
33616            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
33617            EXTENDED_SYS_STATE_DATA::ID => {
33618                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
33619            }
33620            FENCE_STATUS_DATA::ID => {
33621                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
33622            }
33623            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
33624                .map(Self::FILE_TRANSFER_PROTOCOL),
33625            FLIGHT_INFORMATION_DATA::ID => {
33626                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
33627            }
33628            FOLLOW_TARGET_DATA::ID => {
33629                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
33630            }
33631            FUEL_STATUS_DATA::ID => {
33632                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
33633            }
33634            GENERATOR_STATUS_DATA::ID => {
33635                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
33636            }
33637            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
33638                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
33639                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
33640            }
33641            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
33642                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
33643                    .map(Self::GIMBAL_DEVICE_INFORMATION)
33644            }
33645            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
33646                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
33647                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
33648            }
33649            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
33650                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
33651                    .map(Self::GIMBAL_MANAGER_INFORMATION)
33652            }
33653            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
33654                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
33655                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
33656            }
33657            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
33658                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
33659                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
33660            }
33661            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
33662                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
33663                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
33664            }
33665            GIMBAL_MANAGER_STATUS_DATA::ID => {
33666                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
33667            }
33668            GLOBAL_POSITION_INT_DATA::ID => {
33669                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
33670            }
33671            GLOBAL_POSITION_INT_COV_DATA::ID => {
33672                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
33673                    .map(Self::GLOBAL_POSITION_INT_COV)
33674            }
33675            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
33676                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
33677                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
33678            }
33679            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
33680            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
33681            GPS_GLOBAL_ORIGIN_DATA::ID => {
33682                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
33683            }
33684            GPS_INJECT_DATA_DATA::ID => {
33685                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
33686            }
33687            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
33688            GPS_RAW_INT_DATA::ID => {
33689                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
33690            }
33691            GPS_RTCM_DATA_DATA::ID => {
33692                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
33693            }
33694            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
33695            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
33696            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
33697            HIGHRES_IMU_DATA::ID => {
33698                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
33699            }
33700            HIGH_LATENCY_DATA::ID => {
33701                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
33702            }
33703            HIGH_LATENCY2_DATA::ID => {
33704                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
33705            }
33706            HIL_ACTUATOR_CONTROLS_DATA::ID => {
33707                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
33708            }
33709            HIL_CONTROLS_DATA::ID => {
33710                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
33711            }
33712            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
33713            HIL_OPTICAL_FLOW_DATA::ID => {
33714                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
33715            }
33716            HIL_RC_INPUTS_RAW_DATA::ID => {
33717                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
33718            }
33719            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
33720            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
33721            HIL_STATE_QUATERNION_DATA::ID => {
33722                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
33723            }
33724            HOME_POSITION_DATA::ID => {
33725                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
33726            }
33727            HYGROMETER_SENSOR_DATA::ID => {
33728                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
33729            }
33730            ILLUMINATOR_STATUS_DATA::ID => {
33731                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
33732            }
33733            ISBD_LINK_STATUS_DATA::ID => {
33734                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
33735            }
33736            LANDING_TARGET_DATA::ID => {
33737                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
33738            }
33739            LINK_NODE_STATUS_DATA::ID => {
33740                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
33741            }
33742            LOCAL_POSITION_NED_DATA::ID => {
33743                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
33744            }
33745            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
33746                .map(Self::LOCAL_POSITION_NED_COV),
33747            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
33748                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
33749                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
33750            }
33751            LOGGING_ACK_DATA::ID => {
33752                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
33753            }
33754            LOGGING_DATA_DATA::ID => {
33755                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
33756            }
33757            LOGGING_DATA_ACKED_DATA::ID => {
33758                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
33759            }
33760            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
33761            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
33762            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
33763            LOG_REQUEST_DATA_DATA::ID => {
33764                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
33765            }
33766            LOG_REQUEST_END_DATA::ID => {
33767                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
33768            }
33769            LOG_REQUEST_LIST_DATA::ID => {
33770                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
33771            }
33772            MAG_CAL_REPORT_DATA::ID => {
33773                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
33774            }
33775            MANUAL_CONTROL_DATA::ID => {
33776                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
33777            }
33778            MANUAL_SETPOINT_DATA::ID => {
33779                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
33780            }
33781            MEMORY_VECT_DATA::ID => {
33782                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
33783            }
33784            MESSAGE_INTERVAL_DATA::ID => {
33785                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
33786            }
33787            MISSION_ACK_DATA::ID => {
33788                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
33789            }
33790            MISSION_CLEAR_ALL_DATA::ID => {
33791                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
33792            }
33793            MISSION_COUNT_DATA::ID => {
33794                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
33795            }
33796            MISSION_CURRENT_DATA::ID => {
33797                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
33798            }
33799            MISSION_ITEM_DATA::ID => {
33800                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
33801            }
33802            MISSION_ITEM_INT_DATA::ID => {
33803                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
33804            }
33805            MISSION_ITEM_REACHED_DATA::ID => {
33806                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
33807            }
33808            MISSION_REQUEST_DATA::ID => {
33809                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
33810            }
33811            MISSION_REQUEST_INT_DATA::ID => {
33812                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
33813            }
33814            MISSION_REQUEST_LIST_DATA::ID => {
33815                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
33816            }
33817            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
33818                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
33819                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
33820            }
33821            MISSION_SET_CURRENT_DATA::ID => {
33822                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
33823            }
33824            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
33825                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
33826                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
33827            }
33828            MOUNT_ORIENTATION_DATA::ID => {
33829                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
33830            }
33831            NAMED_VALUE_FLOAT_DATA::ID => {
33832                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
33833            }
33834            NAMED_VALUE_INT_DATA::ID => {
33835                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
33836            }
33837            NAV_CONTROLLER_OUTPUT_DATA::ID => {
33838                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
33839            }
33840            NAV_FILTER_BIAS_DATA::ID => {
33841                NAV_FILTER_BIAS_DATA::deser(version, payload).map(Self::NAV_FILTER_BIAS)
33842            }
33843            OBSTACLE_DISTANCE_DATA::ID => {
33844                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
33845            }
33846            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
33847            ONBOARD_COMPUTER_STATUS_DATA::ID => {
33848                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
33849                    .map(Self::ONBOARD_COMPUTER_STATUS)
33850            }
33851            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
33852                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
33853                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
33854            }
33855            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
33856                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
33857                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
33858            }
33859            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
33860                .map(Self::OPEN_DRONE_ID_BASIC_ID),
33861            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
33862                .map(Self::OPEN_DRONE_ID_LOCATION),
33863            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
33864                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
33865                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
33866            }
33867            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
33868                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
33869                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
33870            }
33871            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
33872                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
33873            }
33874            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
33875                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
33876            }
33877            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
33878                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
33879                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
33880            }
33881            OPTICAL_FLOW_DATA::ID => {
33882                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
33883            }
33884            OPTICAL_FLOW_RAD_DATA::ID => {
33885                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
33886            }
33887            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
33888                .map(Self::ORBIT_EXECUTION_STATUS),
33889            PARAM_EXT_ACK_DATA::ID => {
33890                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
33891            }
33892            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
33893                .map(Self::PARAM_EXT_REQUEST_LIST),
33894            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
33895                .map(Self::PARAM_EXT_REQUEST_READ),
33896            PARAM_EXT_SET_DATA::ID => {
33897                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
33898            }
33899            PARAM_EXT_VALUE_DATA::ID => {
33900                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
33901            }
33902            PARAM_MAP_RC_DATA::ID => {
33903                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
33904            }
33905            PARAM_REQUEST_LIST_DATA::ID => {
33906                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
33907            }
33908            PARAM_REQUEST_READ_DATA::ID => {
33909                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
33910            }
33911            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
33912            PARAM_VALUE_DATA::ID => {
33913                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
33914            }
33915            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
33916            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
33917            PLAY_TUNE_V2_DATA::ID => {
33918                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
33919            }
33920            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
33921                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
33922                    .map(Self::POSITION_TARGET_GLOBAL_INT)
33923            }
33924            POSITION_TARGET_LOCAL_NED_DATA::ID => {
33925                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
33926                    .map(Self::POSITION_TARGET_LOCAL_NED)
33927            }
33928            POWER_STATUS_DATA::ID => {
33929                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
33930            }
33931            PROTOCOL_VERSION_DATA::ID => {
33932                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
33933            }
33934            RADIO_CALIBRATION_DATA::ID => {
33935                RADIO_CALIBRATION_DATA::deser(version, payload).map(Self::RADIO_CALIBRATION)
33936            }
33937            RADIO_STATUS_DATA::ID => {
33938                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
33939            }
33940            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
33941            RAW_PRESSURE_DATA::ID => {
33942                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
33943            }
33944            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
33945            RC_CHANNELS_DATA::ID => {
33946                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
33947            }
33948            RC_CHANNELS_OVERRIDE_DATA::ID => {
33949                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
33950            }
33951            RC_CHANNELS_RAW_DATA::ID => {
33952                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
33953            }
33954            RC_CHANNELS_SCALED_DATA::ID => {
33955                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
33956            }
33957            REQUEST_DATA_STREAM_DATA::ID => {
33958                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
33959            }
33960            REQUEST_EVENT_DATA::ID => {
33961                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
33962            }
33963            RESOURCE_REQUEST_DATA::ID => {
33964                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
33965            }
33966            RESPONSE_EVENT_ERROR_DATA::ID => {
33967                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
33968            }
33969            SAFETY_ALLOWED_AREA_DATA::ID => {
33970                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
33971            }
33972            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
33973                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
33974                    .map(Self::SAFETY_SET_ALLOWED_AREA)
33975            }
33976            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
33977            SCALED_IMU2_DATA::ID => {
33978                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
33979            }
33980            SCALED_IMU3_DATA::ID => {
33981                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
33982            }
33983            SCALED_PRESSURE_DATA::ID => {
33984                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
33985            }
33986            SCALED_PRESSURE2_DATA::ID => {
33987                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
33988            }
33989            SCALED_PRESSURE3_DATA::ID => {
33990                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
33991            }
33992            SERIAL_CONTROL_DATA::ID => {
33993                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
33994            }
33995            SERVO_OUTPUT_RAW_DATA::ID => {
33996                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
33997            }
33998            SETUP_SIGNING_DATA::ID => {
33999                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
34000            }
34001            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
34002                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34003                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
34004            }
34005            SET_ATTITUDE_TARGET_DATA::ID => {
34006                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
34007            }
34008            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
34009                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
34010            }
34011            SET_HOME_POSITION_DATA::ID => {
34012                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
34013            }
34014            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
34015            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34016                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34017                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
34018            }
34019            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
34020                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34021                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
34022            }
34023            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
34024            SMART_BATTERY_INFO_DATA::ID => {
34025                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
34026            }
34027            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
34028            STORAGE_INFORMATION_DATA::ID => {
34029                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
34030            }
34031            SUPPORTED_TUNES_DATA::ID => {
34032                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
34033            }
34034            SYSTEM_TIME_DATA::ID => {
34035                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
34036            }
34037            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
34038            TERRAIN_CHECK_DATA::ID => {
34039                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
34040            }
34041            TERRAIN_DATA_DATA::ID => {
34042                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
34043            }
34044            TERRAIN_REPORT_DATA::ID => {
34045                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
34046            }
34047            TERRAIN_REQUEST_DATA::ID => {
34048                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
34049            }
34050            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
34051            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
34052                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
34053                    .map(Self::TIME_ESTIMATE_TO_TARGET)
34054            }
34055            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34056                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
34057                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
34058            }
34059            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34060                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
34061                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
34062            }
34063            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
34064            UALBERTA_SYS_STATUS_DATA::ID => {
34065                UALBERTA_SYS_STATUS_DATA::deser(version, payload).map(Self::UALBERTA_SYS_STATUS)
34066            }
34067            UAVCAN_NODE_INFO_DATA::ID => {
34068                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
34069            }
34070            UAVCAN_NODE_STATUS_DATA::ID => {
34071                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
34072            }
34073            UTM_GLOBAL_POSITION_DATA::ID => {
34074                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
34075            }
34076            V2_EXTENSION_DATA::ID => {
34077                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
34078            }
34079            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
34080            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
34081            VICON_POSITION_ESTIMATE_DATA::ID => {
34082                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
34083                    .map(Self::VICON_POSITION_ESTIMATE)
34084            }
34085            VIDEO_STREAM_INFORMATION_DATA::ID => {
34086                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
34087                    .map(Self::VIDEO_STREAM_INFORMATION)
34088            }
34089            VIDEO_STREAM_STATUS_DATA::ID => {
34090                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
34091            }
34092            VISION_POSITION_ESTIMATE_DATA::ID => {
34093                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34094                    .map(Self::VISION_POSITION_ESTIMATE)
34095            }
34096            VISION_SPEED_ESTIMATE_DATA::ID => {
34097                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
34098            }
34099            WHEEL_DISTANCE_DATA::ID => {
34100                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
34101            }
34102            WIFI_CONFIG_AP_DATA::ID => {
34103                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
34104            }
34105            WINCH_STATUS_DATA::ID => {
34106                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
34107            }
34108            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
34109            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
34110        }
34111    }
34112    fn message_name(&self) -> &'static str {
34113        match self {
34114            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
34115            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
34116            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
34117            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
34118            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
34119            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
34120            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
34121            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
34122            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
34123            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
34124            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
34125            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34126                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
34127            }
34128            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
34129            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
34130            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
34131            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
34132            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
34133            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
34134            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
34135            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
34136            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
34137            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
34138            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
34139            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
34140            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
34141            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
34142            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
34143            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
34144            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
34145            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
34146            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
34147            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
34148            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
34149            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
34150            Self::COLLISION(..) => COLLISION_DATA::NAME,
34151            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
34152            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
34153            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
34154            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
34155            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
34156            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
34157            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
34158            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
34159            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
34160            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
34161            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
34162            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
34163            Self::DEBUG(..) => DEBUG_DATA::NAME,
34164            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
34165            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
34166            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
34167            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
34168            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
34169            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
34170            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
34171            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
34172            Self::EVENT(..) => EVENT_DATA::NAME,
34173            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
34174            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
34175            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
34176            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
34177            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
34178            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
34179            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
34180            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
34181            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
34182            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
34183            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
34184            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
34185            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34186                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
34187            }
34188            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
34189            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
34190            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
34191            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
34192            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
34193            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
34194            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
34195            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
34196            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
34197            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
34198            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
34199            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
34200            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
34201            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
34202            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
34203            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
34204            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
34205            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
34206            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
34207            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
34208            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
34209            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
34210            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
34211            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
34212            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
34213            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
34214            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
34215            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
34216            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
34217            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
34218            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
34219            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
34220            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
34221            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
34222            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34223                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
34224            }
34225            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
34226            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
34227            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
34228            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
34229            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
34230            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
34231            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
34232            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
34233            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
34234            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
34235            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
34236            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
34237            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
34238            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
34239            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
34240            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
34241            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
34242            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
34243            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
34244            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
34245            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
34246            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
34247            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
34248            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
34249            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
34250            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
34251            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
34252            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
34253            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
34254            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
34255            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
34256            Self::NAV_FILTER_BIAS(..) => NAV_FILTER_BIAS_DATA::NAME,
34257            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
34258            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
34259            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
34260            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
34261            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
34262            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
34263            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
34264            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
34265            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
34266            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
34267            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
34268            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
34269            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
34270            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
34271            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
34272            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
34273            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
34274            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
34275            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
34276            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
34277            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
34278            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
34279            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
34280            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
34281            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
34282            Self::PING(..) => PING_DATA::NAME,
34283            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
34284            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
34285            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34286            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
34287            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
34288            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
34289            Self::RADIO_CALIBRATION(..) => RADIO_CALIBRATION_DATA::NAME,
34290            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
34291            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
34292            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
34293            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
34294            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
34295            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
34296            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
34297            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
34298            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
34299            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
34300            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
34301            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
34302            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
34303            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
34304            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
34305            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
34306            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
34307            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
34308            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
34309            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
34310            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
34311            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
34312            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
34313            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
34314            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
34315            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
34316            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
34317            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
34318            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34319            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
34320            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
34321            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
34322            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
34323            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
34324            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
34325            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
34326            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
34327            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
34328            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
34329            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
34330            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
34331            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
34332            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
34333            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
34334                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
34335            }
34336            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34337                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
34338            }
34339            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
34340            Self::UALBERTA_SYS_STATUS(..) => UALBERTA_SYS_STATUS_DATA::NAME,
34341            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
34342            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
34343            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
34344            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
34345            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
34346            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
34347            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
34348            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
34349            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
34350            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
34351            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
34352            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
34353            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
34354            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
34355            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
34356        }
34357    }
34358    fn message_id(&self) -> u32 {
34359        match self {
34360            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
34361            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
34362            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
34363            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
34364            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
34365            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
34366            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
34367            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
34368            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
34369            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
34370            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
34371            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34372                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
34373            }
34374            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
34375            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
34376            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
34377            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
34378            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
34379            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
34380            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
34381            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
34382            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
34383            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
34384            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
34385            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
34386            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
34387            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
34388            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
34389            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
34390            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
34391            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
34392            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
34393            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
34394            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
34395            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
34396            Self::COLLISION(..) => COLLISION_DATA::ID,
34397            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
34398            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
34399            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
34400            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
34401            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
34402            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
34403            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
34404            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
34405            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
34406            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
34407            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
34408            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
34409            Self::DEBUG(..) => DEBUG_DATA::ID,
34410            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
34411            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
34412            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
34413            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
34414            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
34415            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
34416            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
34417            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
34418            Self::EVENT(..) => EVENT_DATA::ID,
34419            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
34420            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
34421            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
34422            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
34423            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
34424            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
34425            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
34426            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
34427            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
34428            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
34429            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
34430            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
34431            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34432                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
34433            }
34434            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
34435            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
34436            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
34437            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
34438            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
34439            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
34440            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
34441            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
34442            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
34443            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
34444            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
34445            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
34446            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
34447            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
34448            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
34449            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
34450            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
34451            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
34452            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
34453            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
34454            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
34455            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
34456            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
34457            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
34458            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
34459            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
34460            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
34461            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
34462            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
34463            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
34464            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
34465            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
34466            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
34467            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
34468            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34469                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
34470            }
34471            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
34472            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
34473            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
34474            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
34475            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
34476            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
34477            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
34478            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
34479            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
34480            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
34481            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
34482            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
34483            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
34484            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
34485            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
34486            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
34487            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
34488            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
34489            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
34490            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
34491            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
34492            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
34493            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
34494            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
34495            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
34496            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
34497            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
34498            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
34499            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
34500            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
34501            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
34502            Self::NAV_FILTER_BIAS(..) => NAV_FILTER_BIAS_DATA::ID,
34503            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
34504            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
34505            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
34506            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
34507            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
34508            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
34509            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
34510            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
34511            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
34512            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
34513            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
34514            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
34515            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
34516            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
34517            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
34518            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
34519            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
34520            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
34521            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
34522            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
34523            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
34524            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
34525            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
34526            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
34527            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
34528            Self::PING(..) => PING_DATA::ID,
34529            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
34530            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
34531            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
34532            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
34533            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
34534            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
34535            Self::RADIO_CALIBRATION(..) => RADIO_CALIBRATION_DATA::ID,
34536            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
34537            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
34538            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
34539            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
34540            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
34541            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
34542            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
34543            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
34544            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
34545            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
34546            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
34547            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
34548            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
34549            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
34550            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
34551            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
34552            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
34553            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
34554            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
34555            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
34556            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
34557            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
34558            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
34559            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
34560            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
34561            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
34562            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
34563            Self::SET_MODE(..) => SET_MODE_DATA::ID,
34564            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
34565            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
34566            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
34567            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
34568            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
34569            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
34570            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
34571            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
34572            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
34573            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
34574            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
34575            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
34576            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
34577            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
34578            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
34579            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
34580            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34581                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
34582            }
34583            Self::TUNNEL(..) => TUNNEL_DATA::ID,
34584            Self::UALBERTA_SYS_STATUS(..) => UALBERTA_SYS_STATUS_DATA::ID,
34585            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
34586            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
34587            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
34588            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
34589            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
34590            Self::VIBRATION(..) => VIBRATION_DATA::ID,
34591            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
34592            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
34593            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
34594            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
34595            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
34596            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
34597            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
34598            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
34599            Self::WIND_COV(..) => WIND_COV_DATA::ID,
34600        }
34601    }
34602    fn message_id_from_name(name: &str) -> Option<u32> {
34603        match name {
34604            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
34605            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
34606            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
34607            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
34608            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
34609            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
34610            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
34611            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
34612            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
34613            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
34614            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
34615            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
34616                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
34617            }
34618            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
34619            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
34620            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
34621            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
34622            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
34623            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
34624            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
34625            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
34626            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
34627            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
34628            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
34629            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
34630            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
34631            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
34632            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
34633            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
34634            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
34635            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
34636            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
34637            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
34638            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
34639            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
34640            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
34641            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
34642            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
34643            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
34644            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
34645            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
34646            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
34647            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
34648            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
34649            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
34650            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
34651            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
34652            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
34653            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
34654            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
34655            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
34656            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
34657            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
34658            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
34659            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
34660            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
34661            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
34662            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
34663            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
34664            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
34665            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
34666            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
34667            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
34668            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
34669            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
34670            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
34671                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
34672            }
34673            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
34674            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
34675            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
34676            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
34677            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
34678                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
34679            }
34680            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
34681            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
34682            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
34683            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
34684            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
34685                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
34686            }
34687            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
34688            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
34689            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
34690            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
34691            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
34692            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
34693            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
34694            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
34695            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
34696            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
34697            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
34698            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
34699            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
34700            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
34701            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
34702            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
34703            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
34704            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
34705            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
34706            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
34707            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
34708            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
34709            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
34710            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
34711            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
34712            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
34713            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
34714            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
34715            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
34716            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
34717                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
34718            }
34719            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
34720            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
34721            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
34722            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
34723            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
34724            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
34725            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
34726            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
34727            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
34728            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
34729            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
34730            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
34731            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
34732            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
34733            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
34734            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
34735            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
34736            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
34737            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
34738            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
34739            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
34740            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
34741            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
34742            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
34743            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
34744            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
34745            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
34746            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
34747            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
34748            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
34749            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
34750            NAV_FILTER_BIAS_DATA::NAME => Some(NAV_FILTER_BIAS_DATA::ID),
34751            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
34752            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
34753            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
34754            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
34755            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
34756            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
34757            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
34758            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
34759            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
34760            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
34761            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
34762            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
34763            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
34764            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
34765            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
34766            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
34767            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
34768            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
34769            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
34770            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
34771            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
34772            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
34773            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
34774            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
34775            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
34776            PING_DATA::NAME => Some(PING_DATA::ID),
34777            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
34778            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
34779            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
34780            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
34781            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
34782            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
34783            RADIO_CALIBRATION_DATA::NAME => Some(RADIO_CALIBRATION_DATA::ID),
34784            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
34785            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
34786            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
34787            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
34788            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
34789            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
34790            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
34791            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
34792            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
34793            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
34794            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
34795            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
34796            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
34797            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
34798            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
34799            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
34800            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
34801            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
34802            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
34803            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
34804            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
34805            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
34806            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
34807            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
34808            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
34809            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
34810            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
34811            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
34812            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
34813                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
34814            }
34815            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
34816                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
34817            }
34818            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
34819            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
34820            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
34821            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
34822            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
34823            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
34824            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
34825            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
34826            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
34827            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
34828            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
34829            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
34830            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
34831            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
34832                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
34833            }
34834            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
34835                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
34836            }
34837            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
34838            UALBERTA_SYS_STATUS_DATA::NAME => Some(UALBERTA_SYS_STATUS_DATA::ID),
34839            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
34840            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
34841            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
34842            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
34843            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
34844            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
34845            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
34846            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
34847            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
34848            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
34849            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
34850            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
34851            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
34852            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
34853            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
34854            _ => None,
34855        }
34856    }
34857    fn default_message_from_id(id: u32) -> Option<Self> {
34858        match id {
34859            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
34860                ACTUATOR_CONTROL_TARGET_DATA::default(),
34861            )),
34862            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
34863                ACTUATOR_OUTPUT_STATUS_DATA::default(),
34864            )),
34865            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
34866            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
34867            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
34868            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
34869            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
34870                ATTITUDE_QUATERNION_DATA::default(),
34871            )),
34872            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
34873                ATTITUDE_QUATERNION_COV_DATA::default(),
34874            )),
34875            ATTITUDE_TARGET_DATA::ID => {
34876                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
34877            }
34878            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
34879            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
34880            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34881                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
34882                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
34883                ))
34884            }
34885            AUTOPILOT_VERSION_DATA::ID => {
34886                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
34887            }
34888            AVAILABLE_MODES_DATA::ID => {
34889                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
34890            }
34891            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
34892                AVAILABLE_MODES_MONITOR_DATA::default(),
34893            )),
34894            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
34895            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
34896            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
34897            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
34898                CAMERA_CAPTURE_STATUS_DATA::default(),
34899            )),
34900            CAMERA_FOV_STATUS_DATA::ID => {
34901                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
34902            }
34903            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
34904                CAMERA_IMAGE_CAPTURED_DATA::default(),
34905            )),
34906            CAMERA_INFORMATION_DATA::ID => {
34907                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
34908            }
34909            CAMERA_SETTINGS_DATA::ID => {
34910                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
34911            }
34912            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
34913                CAMERA_THERMAL_RANGE_DATA::default(),
34914            )),
34915            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
34916                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
34917            )),
34918            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
34919                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
34920            )),
34921            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
34922            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
34923            CAN_FILTER_MODIFY_DATA::ID => {
34924                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
34925            }
34926            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
34927            CELLULAR_CONFIG_DATA::ID => {
34928                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
34929            }
34930            CELLULAR_STATUS_DATA::ID => {
34931                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
34932            }
34933            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
34934                CHANGE_OPERATOR_CONTROL_DATA::default(),
34935            )),
34936            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
34937                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
34938            )),
34939            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
34940            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
34941            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
34942            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
34943            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
34944            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
34945                COMPONENT_INFORMATION_DATA::default(),
34946            )),
34947            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
34948                COMPONENT_INFORMATION_BASIC_DATA::default(),
34949            )),
34950            COMPONENT_METADATA_DATA::ID => {
34951                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
34952            }
34953            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
34954                CONTROL_SYSTEM_STATE_DATA::default(),
34955            )),
34956            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
34957                CURRENT_EVENT_SEQUENCE_DATA::default(),
34958            )),
34959            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
34960            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
34961            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
34962                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
34963            )),
34964            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
34965            DEBUG_FLOAT_ARRAY_DATA::ID => {
34966                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
34967            }
34968            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
34969            DISTANCE_SENSOR_DATA::ID => {
34970                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
34971            }
34972            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
34973            ENCAPSULATED_DATA_DATA::ID => {
34974                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
34975            }
34976            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
34977            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
34978            ESTIMATOR_STATUS_DATA::ID => {
34979                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
34980            }
34981            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
34982            EXTENDED_SYS_STATE_DATA::ID => {
34983                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
34984            }
34985            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
34986            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
34987                FILE_TRANSFER_PROTOCOL_DATA::default(),
34988            )),
34989            FLIGHT_INFORMATION_DATA::ID => {
34990                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
34991            }
34992            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
34993            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
34994            GENERATOR_STATUS_DATA::ID => {
34995                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
34996            }
34997            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
34998                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
34999            )),
35000            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35001                GIMBAL_DEVICE_INFORMATION_DATA::default(),
35002            )),
35003            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35004                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
35005            )),
35006            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35007                GIMBAL_MANAGER_INFORMATION_DATA::default(),
35008            )),
35009            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35010                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
35011            )),
35012            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35013                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35014                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
35015                ))
35016            }
35017            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35018                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
35019            )),
35020            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35021                GIMBAL_MANAGER_STATUS_DATA::default(),
35022            )),
35023            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35024                GLOBAL_POSITION_INT_DATA::default(),
35025            )),
35026            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35027                GLOBAL_POSITION_INT_COV_DATA::default(),
35028            )),
35029            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35030                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35031                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
35032                ))
35033            }
35034            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
35035            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
35036            GPS_GLOBAL_ORIGIN_DATA::ID => {
35037                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
35038            }
35039            GPS_INJECT_DATA_DATA::ID => {
35040                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
35041            }
35042            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
35043            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
35044            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
35045            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
35046            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
35047            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
35048            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
35049            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
35050            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
35051            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35052                HIL_ACTUATOR_CONTROLS_DATA::default(),
35053            )),
35054            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
35055            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
35056            HIL_OPTICAL_FLOW_DATA::ID => {
35057                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
35058            }
35059            HIL_RC_INPUTS_RAW_DATA::ID => {
35060                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
35061            }
35062            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
35063            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
35064            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35065                HIL_STATE_QUATERNION_DATA::default(),
35066            )),
35067            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
35068            HYGROMETER_SENSOR_DATA::ID => {
35069                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
35070            }
35071            ILLUMINATOR_STATUS_DATA::ID => {
35072                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
35073            }
35074            ISBD_LINK_STATUS_DATA::ID => {
35075                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
35076            }
35077            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
35078            LINK_NODE_STATUS_DATA::ID => {
35079                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
35080            }
35081            LOCAL_POSITION_NED_DATA::ID => {
35082                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
35083            }
35084            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35085                LOCAL_POSITION_NED_COV_DATA::default(),
35086            )),
35087            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35088                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35089                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
35090                ))
35091            }
35092            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
35093            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
35094            LOGGING_DATA_ACKED_DATA::ID => {
35095                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
35096            }
35097            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
35098            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
35099            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
35100            LOG_REQUEST_DATA_DATA::ID => {
35101                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
35102            }
35103            LOG_REQUEST_END_DATA::ID => {
35104                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
35105            }
35106            LOG_REQUEST_LIST_DATA::ID => {
35107                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
35108            }
35109            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
35110            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
35111            MANUAL_SETPOINT_DATA::ID => {
35112                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
35113            }
35114            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
35115            MESSAGE_INTERVAL_DATA::ID => {
35116                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
35117            }
35118            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
35119            MISSION_CLEAR_ALL_DATA::ID => {
35120                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
35121            }
35122            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
35123            MISSION_CURRENT_DATA::ID => {
35124                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
35125            }
35126            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
35127            MISSION_ITEM_INT_DATA::ID => {
35128                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
35129            }
35130            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35131                MISSION_ITEM_REACHED_DATA::default(),
35132            )),
35133            MISSION_REQUEST_DATA::ID => {
35134                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
35135            }
35136            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35137                MISSION_REQUEST_INT_DATA::default(),
35138            )),
35139            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35140                MISSION_REQUEST_LIST_DATA::default(),
35141            )),
35142            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35143                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
35144            )),
35145            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35146                MISSION_SET_CURRENT_DATA::default(),
35147            )),
35148            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35149                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
35150            )),
35151            MOUNT_ORIENTATION_DATA::ID => {
35152                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
35153            }
35154            NAMED_VALUE_FLOAT_DATA::ID => {
35155                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
35156            }
35157            NAMED_VALUE_INT_DATA::ID => {
35158                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
35159            }
35160            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35161                NAV_CONTROLLER_OUTPUT_DATA::default(),
35162            )),
35163            NAV_FILTER_BIAS_DATA::ID => {
35164                Some(Self::NAV_FILTER_BIAS(NAV_FILTER_BIAS_DATA::default()))
35165            }
35166            OBSTACLE_DISTANCE_DATA::ID => {
35167                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
35168            }
35169            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
35170            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35171                ONBOARD_COMPUTER_STATUS_DATA::default(),
35172            )),
35173            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35174                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
35175            )),
35176            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35177                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
35178            )),
35179            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35180                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
35181            )),
35182            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35183                OPEN_DRONE_ID_LOCATION_DATA::default(),
35184            )),
35185            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35186                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
35187            )),
35188            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35189                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
35190            )),
35191            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35192                OPEN_DRONE_ID_SELF_ID_DATA::default(),
35193            )),
35194            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35195                OPEN_DRONE_ID_SYSTEM_DATA::default(),
35196            )),
35197            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35198                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
35199            )),
35200            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
35201            OPTICAL_FLOW_RAD_DATA::ID => {
35202                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
35203            }
35204            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35205                ORBIT_EXECUTION_STATUS_DATA::default(),
35206            )),
35207            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
35208            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35209                PARAM_EXT_REQUEST_LIST_DATA::default(),
35210            )),
35211            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35212                PARAM_EXT_REQUEST_READ_DATA::default(),
35213            )),
35214            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
35215            PARAM_EXT_VALUE_DATA::ID => {
35216                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
35217            }
35218            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
35219            PARAM_REQUEST_LIST_DATA::ID => {
35220                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
35221            }
35222            PARAM_REQUEST_READ_DATA::ID => {
35223                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
35224            }
35225            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
35226            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
35227            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
35228            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
35229            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
35230            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35231                POSITION_TARGET_GLOBAL_INT_DATA::default(),
35232            )),
35233            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35234                POSITION_TARGET_LOCAL_NED_DATA::default(),
35235            )),
35236            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
35237            PROTOCOL_VERSION_DATA::ID => {
35238                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
35239            }
35240            RADIO_CALIBRATION_DATA::ID => {
35241                Some(Self::RADIO_CALIBRATION(RADIO_CALIBRATION_DATA::default()))
35242            }
35243            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
35244            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
35245            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
35246            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
35247            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
35248            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35249                RC_CHANNELS_OVERRIDE_DATA::default(),
35250            )),
35251            RC_CHANNELS_RAW_DATA::ID => {
35252                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
35253            }
35254            RC_CHANNELS_SCALED_DATA::ID => {
35255                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
35256            }
35257            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35258                REQUEST_DATA_STREAM_DATA::default(),
35259            )),
35260            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
35261            RESOURCE_REQUEST_DATA::ID => {
35262                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
35263            }
35264            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35265                RESPONSE_EVENT_ERROR_DATA::default(),
35266            )),
35267            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35268                SAFETY_ALLOWED_AREA_DATA::default(),
35269            )),
35270            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35271                SAFETY_SET_ALLOWED_AREA_DATA::default(),
35272            )),
35273            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
35274            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
35275            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
35276            SCALED_PRESSURE_DATA::ID => {
35277                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
35278            }
35279            SCALED_PRESSURE2_DATA::ID => {
35280                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
35281            }
35282            SCALED_PRESSURE3_DATA::ID => {
35283                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
35284            }
35285            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
35286            SERVO_OUTPUT_RAW_DATA::ID => {
35287                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
35288            }
35289            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
35290            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35291                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
35292            )),
35293            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35294                SET_ATTITUDE_TARGET_DATA::default(),
35295            )),
35296            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35297                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
35298            )),
35299            SET_HOME_POSITION_DATA::ID => {
35300                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
35301            }
35302            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
35303            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35304                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
35305            )),
35306            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35307                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
35308            )),
35309            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
35310            SMART_BATTERY_INFO_DATA::ID => {
35311                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
35312            }
35313            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
35314            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35315                STORAGE_INFORMATION_DATA::default(),
35316            )),
35317            SUPPORTED_TUNES_DATA::ID => {
35318                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
35319            }
35320            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
35321            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
35322            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
35323            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
35324            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
35325            TERRAIN_REQUEST_DATA::ID => {
35326                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
35327            }
35328            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
35329            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35330                TIME_ESTIMATE_TO_TARGET_DATA::default(),
35331            )),
35332            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35333                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35334                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
35335                ))
35336            }
35337            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35338                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35339                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
35340                ))
35341            }
35342            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
35343            UALBERTA_SYS_STATUS_DATA::ID => Some(Self::UALBERTA_SYS_STATUS(
35344                UALBERTA_SYS_STATUS_DATA::default(),
35345            )),
35346            UAVCAN_NODE_INFO_DATA::ID => {
35347                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
35348            }
35349            UAVCAN_NODE_STATUS_DATA::ID => {
35350                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
35351            }
35352            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35353                UTM_GLOBAL_POSITION_DATA::default(),
35354            )),
35355            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
35356            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
35357            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
35358            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
35359                VICON_POSITION_ESTIMATE_DATA::default(),
35360            )),
35361            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
35362                VIDEO_STREAM_INFORMATION_DATA::default(),
35363            )),
35364            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
35365                VIDEO_STREAM_STATUS_DATA::default(),
35366            )),
35367            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
35368                VISION_POSITION_ESTIMATE_DATA::default(),
35369            )),
35370            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
35371                VISION_SPEED_ESTIMATE_DATA::default(),
35372            )),
35373            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
35374            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
35375            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
35376            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
35377            _ => None,
35378        }
35379    }
35380    #[cfg(feature = "arbitrary")]
35381    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
35382        match id {
35383            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
35384                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35385            )),
35386            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
35387                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
35388            )),
35389            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
35390            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
35391            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
35392            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
35393            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
35394                ATTITUDE_QUATERNION_DATA::random(rng),
35395            )),
35396            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
35397                ATTITUDE_QUATERNION_COV_DATA::random(rng),
35398            )),
35399            ATTITUDE_TARGET_DATA::ID => {
35400                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
35401            }
35402            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
35403            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
35404            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35405                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35406                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
35407                ))
35408            }
35409            AUTOPILOT_VERSION_DATA::ID => {
35410                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
35411            }
35412            AVAILABLE_MODES_DATA::ID => {
35413                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
35414            }
35415            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35416                AVAILABLE_MODES_MONITOR_DATA::random(rng),
35417            )),
35418            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
35419            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
35420            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
35421            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35422                CAMERA_CAPTURE_STATUS_DATA::random(rng),
35423            )),
35424            CAMERA_FOV_STATUS_DATA::ID => {
35425                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
35426            }
35427            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35428                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
35429            )),
35430            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
35431                CAMERA_INFORMATION_DATA::random(rng),
35432            )),
35433            CAMERA_SETTINGS_DATA::ID => {
35434                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
35435            }
35436            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35437                CAMERA_THERMAL_RANGE_DATA::random(rng),
35438            )),
35439            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35440                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
35441            )),
35442            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35443                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
35444            )),
35445            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
35446            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
35447            CAN_FILTER_MODIFY_DATA::ID => {
35448                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
35449            }
35450            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
35451            CELLULAR_CONFIG_DATA::ID => {
35452                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
35453            }
35454            CELLULAR_STATUS_DATA::ID => {
35455                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
35456            }
35457            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
35458                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
35459            )),
35460            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
35461                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
35462            )),
35463            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
35464            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
35465            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
35466            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
35467            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
35468            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35469                COMPONENT_INFORMATION_DATA::random(rng),
35470            )),
35471            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35472                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
35473            )),
35474            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
35475                COMPONENT_METADATA_DATA::random(rng),
35476            )),
35477            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35478                CONTROL_SYSTEM_STATE_DATA::random(rng),
35479            )),
35480            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35481                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
35482            )),
35483            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
35484            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
35485            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35486                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
35487            )),
35488            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
35489            DEBUG_FLOAT_ARRAY_DATA::ID => {
35490                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
35491            }
35492            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
35493            DISTANCE_SENSOR_DATA::ID => {
35494                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
35495            }
35496            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
35497            ENCAPSULATED_DATA_DATA::ID => {
35498                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
35499            }
35500            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
35501            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
35502            ESTIMATOR_STATUS_DATA::ID => {
35503                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
35504            }
35505            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
35506            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
35507                EXTENDED_SYS_STATE_DATA::random(rng),
35508            )),
35509            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
35510            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35511                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
35512            )),
35513            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
35514                FLIGHT_INFORMATION_DATA::random(rng),
35515            )),
35516            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
35517            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
35518            GENERATOR_STATUS_DATA::ID => {
35519                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
35520            }
35521            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35522                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
35523            )),
35524            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35525                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
35526            )),
35527            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35528                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
35529            )),
35530            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35531                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
35532            )),
35533            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35534                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
35535            )),
35536            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35537                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35538                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
35539                ))
35540            }
35541            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35542                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
35543            )),
35544            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35545                GIMBAL_MANAGER_STATUS_DATA::random(rng),
35546            )),
35547            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35548                GLOBAL_POSITION_INT_DATA::random(rng),
35549            )),
35550            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35551                GLOBAL_POSITION_INT_COV_DATA::random(rng),
35552            )),
35553            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35554                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35555                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
35556                ))
35557            }
35558            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
35559            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
35560            GPS_GLOBAL_ORIGIN_DATA::ID => {
35561                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
35562            }
35563            GPS_INJECT_DATA_DATA::ID => {
35564                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
35565            }
35566            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
35567            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
35568            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
35569            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
35570            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
35571            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
35572            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
35573            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
35574            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
35575            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35576                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
35577            )),
35578            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
35579            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
35580            HIL_OPTICAL_FLOW_DATA::ID => {
35581                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
35582            }
35583            HIL_RC_INPUTS_RAW_DATA::ID => {
35584                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
35585            }
35586            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
35587            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
35588            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35589                HIL_STATE_QUATERNION_DATA::random(rng),
35590            )),
35591            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
35592            HYGROMETER_SENSOR_DATA::ID => {
35593                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
35594            }
35595            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
35596                ILLUMINATOR_STATUS_DATA::random(rng),
35597            )),
35598            ISBD_LINK_STATUS_DATA::ID => {
35599                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
35600            }
35601            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
35602            LINK_NODE_STATUS_DATA::ID => {
35603                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
35604            }
35605            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
35606                LOCAL_POSITION_NED_DATA::random(rng),
35607            )),
35608            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35609                LOCAL_POSITION_NED_COV_DATA::random(rng),
35610            )),
35611            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35612                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35613                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
35614                ))
35615            }
35616            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
35617            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
35618            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
35619                LOGGING_DATA_ACKED_DATA::random(rng),
35620            )),
35621            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
35622            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
35623            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
35624            LOG_REQUEST_DATA_DATA::ID => {
35625                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
35626            }
35627            LOG_REQUEST_END_DATA::ID => {
35628                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
35629            }
35630            LOG_REQUEST_LIST_DATA::ID => {
35631                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
35632            }
35633            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
35634            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
35635            MANUAL_SETPOINT_DATA::ID => {
35636                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
35637            }
35638            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
35639            MESSAGE_INTERVAL_DATA::ID => {
35640                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
35641            }
35642            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
35643            MISSION_CLEAR_ALL_DATA::ID => {
35644                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
35645            }
35646            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
35647            MISSION_CURRENT_DATA::ID => {
35648                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
35649            }
35650            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
35651            MISSION_ITEM_INT_DATA::ID => {
35652                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
35653            }
35654            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35655                MISSION_ITEM_REACHED_DATA::random(rng),
35656            )),
35657            MISSION_REQUEST_DATA::ID => {
35658                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
35659            }
35660            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35661                MISSION_REQUEST_INT_DATA::random(rng),
35662            )),
35663            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35664                MISSION_REQUEST_LIST_DATA::random(rng),
35665            )),
35666            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35667                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
35668            )),
35669            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35670                MISSION_SET_CURRENT_DATA::random(rng),
35671            )),
35672            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35673                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
35674            )),
35675            MOUNT_ORIENTATION_DATA::ID => {
35676                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
35677            }
35678            NAMED_VALUE_FLOAT_DATA::ID => {
35679                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
35680            }
35681            NAMED_VALUE_INT_DATA::ID => {
35682                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
35683            }
35684            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35685                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
35686            )),
35687            NAV_FILTER_BIAS_DATA::ID => {
35688                Some(Self::NAV_FILTER_BIAS(NAV_FILTER_BIAS_DATA::random(rng)))
35689            }
35690            OBSTACLE_DISTANCE_DATA::ID => {
35691                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
35692            }
35693            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
35694            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35695                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
35696            )),
35697            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35698                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
35699            )),
35700            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35701                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
35702            )),
35703            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35704                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
35705            )),
35706            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35707                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
35708            )),
35709            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35710                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
35711            )),
35712            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35713                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
35714            )),
35715            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35716                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
35717            )),
35718            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35719                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
35720            )),
35721            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35722                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
35723            )),
35724            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
35725            OPTICAL_FLOW_RAD_DATA::ID => {
35726                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
35727            }
35728            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35729                ORBIT_EXECUTION_STATUS_DATA::random(rng),
35730            )),
35731            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
35732            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35733                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
35734            )),
35735            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35736                PARAM_EXT_REQUEST_READ_DATA::random(rng),
35737            )),
35738            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
35739            PARAM_EXT_VALUE_DATA::ID => {
35740                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
35741            }
35742            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
35743            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
35744                PARAM_REQUEST_LIST_DATA::random(rng),
35745            )),
35746            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
35747                PARAM_REQUEST_READ_DATA::random(rng),
35748            )),
35749            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
35750            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
35751            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
35752            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
35753            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
35754            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35755                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
35756            )),
35757            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35758                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
35759            )),
35760            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
35761            PROTOCOL_VERSION_DATA::ID => {
35762                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
35763            }
35764            RADIO_CALIBRATION_DATA::ID => {
35765                Some(Self::RADIO_CALIBRATION(RADIO_CALIBRATION_DATA::random(rng)))
35766            }
35767            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
35768            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
35769            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
35770            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
35771            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
35772            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35773                RC_CHANNELS_OVERRIDE_DATA::random(rng),
35774            )),
35775            RC_CHANNELS_RAW_DATA::ID => {
35776                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
35777            }
35778            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
35779                RC_CHANNELS_SCALED_DATA::random(rng),
35780            )),
35781            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35782                REQUEST_DATA_STREAM_DATA::random(rng),
35783            )),
35784            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
35785            RESOURCE_REQUEST_DATA::ID => {
35786                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
35787            }
35788            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35789                RESPONSE_EVENT_ERROR_DATA::random(rng),
35790            )),
35791            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35792                SAFETY_ALLOWED_AREA_DATA::random(rng),
35793            )),
35794            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35795                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
35796            )),
35797            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
35798            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
35799            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
35800            SCALED_PRESSURE_DATA::ID => {
35801                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
35802            }
35803            SCALED_PRESSURE2_DATA::ID => {
35804                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
35805            }
35806            SCALED_PRESSURE3_DATA::ID => {
35807                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
35808            }
35809            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
35810            SERVO_OUTPUT_RAW_DATA::ID => {
35811                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
35812            }
35813            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
35814            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35815                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35816            )),
35817            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35818                SET_ATTITUDE_TARGET_DATA::random(rng),
35819            )),
35820            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35821                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
35822            )),
35823            SET_HOME_POSITION_DATA::ID => {
35824                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
35825            }
35826            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
35827            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35828                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
35829            )),
35830            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35831                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
35832            )),
35833            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
35834            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
35835                SMART_BATTERY_INFO_DATA::random(rng),
35836            )),
35837            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
35838            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35839                STORAGE_INFORMATION_DATA::random(rng),
35840            )),
35841            SUPPORTED_TUNES_DATA::ID => {
35842                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
35843            }
35844            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
35845            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
35846            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
35847            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
35848            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
35849            TERRAIN_REQUEST_DATA::ID => {
35850                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
35851            }
35852            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
35853            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35854                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
35855            )),
35856            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35857                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35858                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
35859                ))
35860            }
35861            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35862                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35863                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
35864                ))
35865            }
35866            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
35867            UALBERTA_SYS_STATUS_DATA::ID => Some(Self::UALBERTA_SYS_STATUS(
35868                UALBERTA_SYS_STATUS_DATA::random(rng),
35869            )),
35870            UAVCAN_NODE_INFO_DATA::ID => {
35871                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
35872            }
35873            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
35874                UAVCAN_NODE_STATUS_DATA::random(rng),
35875            )),
35876            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35877                UTM_GLOBAL_POSITION_DATA::random(rng),
35878            )),
35879            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
35880            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
35881            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
35882            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
35883                VICON_POSITION_ESTIMATE_DATA::random(rng),
35884            )),
35885            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
35886                VIDEO_STREAM_INFORMATION_DATA::random(rng),
35887            )),
35888            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
35889                VIDEO_STREAM_STATUS_DATA::random(rng),
35890            )),
35891            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
35892                VISION_POSITION_ESTIMATE_DATA::random(rng),
35893            )),
35894            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
35895                VISION_SPEED_ESTIMATE_DATA::random(rng),
35896            )),
35897            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
35898            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
35899            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
35900            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
35901            _ => None,
35902        }
35903    }
35904    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
35905        match self {
35906            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
35907            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
35908            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
35909            Self::AIS_VESSEL(body) => body.ser(version, bytes),
35910            Self::ALTITUDE(body) => body.ser(version, bytes),
35911            Self::ATTITUDE(body) => body.ser(version, bytes),
35912            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
35913            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
35914            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
35915            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
35916            Self::AUTH_KEY(body) => body.ser(version, bytes),
35917            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
35918            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
35919            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
35920            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
35921            Self::BATTERY_INFO(body) => body.ser(version, bytes),
35922            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
35923            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
35924            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
35925            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
35926            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
35927            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
35928            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
35929            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
35930            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
35931            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
35932            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
35933            Self::CANFD_FRAME(body) => body.ser(version, bytes),
35934            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
35935            Self::CAN_FRAME(body) => body.ser(version, bytes),
35936            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
35937            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
35938            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
35939            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
35940            Self::COLLISION(body) => body.ser(version, bytes),
35941            Self::COMMAND_ACK(body) => body.ser(version, bytes),
35942            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
35943            Self::COMMAND_INT(body) => body.ser(version, bytes),
35944            Self::COMMAND_LONG(body) => body.ser(version, bytes),
35945            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
35946            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
35947            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
35948            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
35949            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
35950            Self::CURRENT_MODE(body) => body.ser(version, bytes),
35951            Self::DATA_STREAM(body) => body.ser(version, bytes),
35952            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
35953            Self::DEBUG(body) => body.ser(version, bytes),
35954            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
35955            Self::DEBUG_VECT(body) => body.ser(version, bytes),
35956            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
35957            Self::EFI_STATUS(body) => body.ser(version, bytes),
35958            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
35959            Self::ESC_INFO(body) => body.ser(version, bytes),
35960            Self::ESC_STATUS(body) => body.ser(version, bytes),
35961            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
35962            Self::EVENT(body) => body.ser(version, bytes),
35963            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
35964            Self::FENCE_STATUS(body) => body.ser(version, bytes),
35965            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
35966            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
35967            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
35968            Self::FUEL_STATUS(body) => body.ser(version, bytes),
35969            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
35970            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
35971            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
35972            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
35973            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
35974            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
35975            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
35976            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
35977            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
35978            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
35979            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
35980            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
35981            Self::GPS2_RAW(body) => body.ser(version, bytes),
35982            Self::GPS2_RTK(body) => body.ser(version, bytes),
35983            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
35984            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
35985            Self::GPS_INPUT(body) => body.ser(version, bytes),
35986            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
35987            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
35988            Self::GPS_RTK(body) => body.ser(version, bytes),
35989            Self::GPS_STATUS(body) => body.ser(version, bytes),
35990            Self::HEARTBEAT(body) => body.ser(version, bytes),
35991            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
35992            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
35993            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
35994            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
35995            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
35996            Self::HIL_GPS(body) => body.ser(version, bytes),
35997            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
35998            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
35999            Self::HIL_SENSOR(body) => body.ser(version, bytes),
36000            Self::HIL_STATE(body) => body.ser(version, bytes),
36001            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
36002            Self::HOME_POSITION(body) => body.ser(version, bytes),
36003            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
36004            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
36005            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
36006            Self::LANDING_TARGET(body) => body.ser(version, bytes),
36007            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
36008            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
36009            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
36010            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
36011            Self::LOGGING_ACK(body) => body.ser(version, bytes),
36012            Self::LOGGING_DATA(body) => body.ser(version, bytes),
36013            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
36014            Self::LOG_DATA(body) => body.ser(version, bytes),
36015            Self::LOG_ENTRY(body) => body.ser(version, bytes),
36016            Self::LOG_ERASE(body) => body.ser(version, bytes),
36017            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
36018            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
36019            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
36020            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
36021            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
36022            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
36023            Self::MEMORY_VECT(body) => body.ser(version, bytes),
36024            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
36025            Self::MISSION_ACK(body) => body.ser(version, bytes),
36026            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
36027            Self::MISSION_COUNT(body) => body.ser(version, bytes),
36028            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
36029            Self::MISSION_ITEM(body) => body.ser(version, bytes),
36030            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
36031            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
36032            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
36033            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
36034            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
36035            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
36036            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
36037            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
36038            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
36039            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
36040            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
36041            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
36042            Self::NAV_FILTER_BIAS(body) => body.ser(version, bytes),
36043            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
36044            Self::ODOMETRY(body) => body.ser(version, bytes),
36045            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
36046            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
36047            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
36048            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
36049            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
36050            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
36051            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
36052            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
36053            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
36054            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
36055            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
36056            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
36057            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
36058            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
36059            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
36060            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
36061            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
36062            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
36063            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
36064            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
36065            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
36066            Self::PARAM_SET(body) => body.ser(version, bytes),
36067            Self::PARAM_VALUE(body) => body.ser(version, bytes),
36068            Self::PING(body) => body.ser(version, bytes),
36069            Self::PLAY_TUNE(body) => body.ser(version, bytes),
36070            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
36071            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36072            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36073            Self::POWER_STATUS(body) => body.ser(version, bytes),
36074            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
36075            Self::RADIO_CALIBRATION(body) => body.ser(version, bytes),
36076            Self::RADIO_STATUS(body) => body.ser(version, bytes),
36077            Self::RAW_IMU(body) => body.ser(version, bytes),
36078            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
36079            Self::RAW_RPM(body) => body.ser(version, bytes),
36080            Self::RC_CHANNELS(body) => body.ser(version, bytes),
36081            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
36082            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
36083            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
36084            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
36085            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
36086            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
36087            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
36088            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
36089            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
36090            Self::SCALED_IMU(body) => body.ser(version, bytes),
36091            Self::SCALED_IMU2(body) => body.ser(version, bytes),
36092            Self::SCALED_IMU3(body) => body.ser(version, bytes),
36093            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
36094            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
36095            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
36096            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
36097            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
36098            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
36099            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36100            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
36101            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36102            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
36103            Self::SET_MODE(body) => body.ser(version, bytes),
36104            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36105            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36106            Self::SIM_STATE(body) => body.ser(version, bytes),
36107            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
36108            Self::STATUSTEXT(body) => body.ser(version, bytes),
36109            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
36110            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
36111            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
36112            Self::SYS_STATUS(body) => body.ser(version, bytes),
36113            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
36114            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
36115            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
36116            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
36117            Self::TIMESYNC(body) => body.ser(version, bytes),
36118            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
36119            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
36120            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
36121            Self::TUNNEL(body) => body.ser(version, bytes),
36122            Self::UALBERTA_SYS_STATUS(body) => body.ser(version, bytes),
36123            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
36124            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
36125            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
36126            Self::V2_EXTENSION(body) => body.ser(version, bytes),
36127            Self::VFR_HUD(body) => body.ser(version, bytes),
36128            Self::VIBRATION(body) => body.ser(version, bytes),
36129            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36130            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
36131            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
36132            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36133            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
36134            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
36135            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
36136            Self::WINCH_STATUS(body) => body.ser(version, bytes),
36137            Self::WIND_COV(body) => body.ser(version, bytes),
36138        }
36139    }
36140    fn extra_crc(id: u32) -> u8 {
36141        match id {
36142            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36143            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
36144            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
36145            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
36146            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
36147            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
36148            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
36149            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
36150            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
36151            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
36152            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
36153            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36154                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
36155            }
36156            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
36157            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
36158            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
36159            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
36160            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
36161            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
36162            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
36163            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
36164            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
36165            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
36166            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
36167            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
36168            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
36169            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
36170            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
36171            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
36172            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
36173            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
36174            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
36175            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
36176            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
36177            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
36178            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
36179            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
36180            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
36181            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
36182            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
36183            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
36184            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
36185            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
36186            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
36187            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
36188            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
36189            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
36190            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
36191            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
36192            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
36193            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
36194            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
36195            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
36196            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
36197            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
36198            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
36199            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
36200            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
36201            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
36202            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
36203            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
36204            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
36205            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
36206            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
36207            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
36208            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
36209            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
36210            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
36211            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
36212            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
36213            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36214                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
36215            }
36216            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
36217            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
36218            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
36219            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
36220            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36221                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
36222            }
36223            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
36224            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
36225            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36226            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
36227            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
36228            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
36229            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
36230            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
36231            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
36232            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
36233            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
36234            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
36235            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
36236            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
36237            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
36238            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
36239            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
36240            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
36241            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
36242            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
36243            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
36244            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
36245            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
36246            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
36247            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
36248            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
36249            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
36250            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
36251            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
36252            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36253                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
36254            }
36255            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
36256            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
36257            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
36258            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
36259            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
36260            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
36261            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
36262            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
36263            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
36264            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
36265            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
36266            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
36267            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
36268            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
36269            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
36270            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
36271            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
36272            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
36273            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
36274            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
36275            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
36276            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
36277            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
36278            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
36279            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
36280            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
36281            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
36282            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
36283            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
36284            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
36285            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
36286            NAV_FILTER_BIAS_DATA::ID => NAV_FILTER_BIAS_DATA::EXTRA_CRC,
36287            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
36288            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
36289            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
36290            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
36291            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
36292            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
36293            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
36294            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
36295            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
36296            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
36297            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
36298            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
36299            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
36300            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
36301            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
36302            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
36303            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
36304            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
36305            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
36306            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
36307            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
36308            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
36309            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
36310            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
36311            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
36312            PING_DATA::ID => PING_DATA::EXTRA_CRC,
36313            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
36314            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
36315            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
36316            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36317            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
36318            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
36319            RADIO_CALIBRATION_DATA::ID => RADIO_CALIBRATION_DATA::EXTRA_CRC,
36320            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
36321            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
36322            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
36323            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
36324            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
36325            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
36326            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
36327            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
36328            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
36329            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
36330            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
36331            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
36332            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
36333            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
36334            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
36335            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
36336            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
36337            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
36338            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
36339            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
36340            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
36341            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
36342            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
36343            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36344            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
36345            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36346            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
36347            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
36348            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
36349                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
36350            }
36351            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36352            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
36353            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
36354            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
36355            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
36356            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
36357            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
36358            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
36359            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
36360            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
36361            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
36362            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
36363            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
36364            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
36365            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36366                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
36367            }
36368            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36369                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
36370            }
36371            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
36372            UALBERTA_SYS_STATUS_DATA::ID => UALBERTA_SYS_STATUS_DATA::EXTRA_CRC,
36373            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
36374            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
36375            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
36376            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
36377            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
36378            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
36379            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36380            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
36381            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
36382            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36383            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
36384            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
36385            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
36386            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
36387            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
36388            _ => 0,
36389        }
36390    }
36391    fn target_system_id(&self) -> Option<u8> {
36392        match self {
36393            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
36394            Self::CANFD_FRAME(inner) => Some(inner.target_system),
36395            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
36396            Self::CAN_FRAME(inner) => Some(inner.target_system),
36397            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
36398            Self::COMMAND_ACK(inner) => Some(inner.target_system),
36399            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
36400            Self::COMMAND_INT(inner) => Some(inner.target_system),
36401            Self::COMMAND_LONG(inner) => Some(inner.target_system),
36402            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
36403            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
36404            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
36405            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
36406            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
36407            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
36408            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
36409            Self::LOGGING_ACK(inner) => Some(inner.target_system),
36410            Self::LOGGING_DATA(inner) => Some(inner.target_system),
36411            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
36412            Self::LOG_ERASE(inner) => Some(inner.target_system),
36413            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
36414            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
36415            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
36416            Self::MISSION_ACK(inner) => Some(inner.target_system),
36417            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
36418            Self::MISSION_COUNT(inner) => Some(inner.target_system),
36419            Self::MISSION_ITEM(inner) => Some(inner.target_system),
36420            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
36421            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
36422            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
36423            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
36424            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
36425            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
36426            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
36427            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
36428            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
36429            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
36430            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
36431            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
36432            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
36433            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
36434            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
36435            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
36436            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
36437            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
36438            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
36439            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
36440            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
36441            Self::PARAM_SET(inner) => Some(inner.target_system),
36442            Self::PING(inner) => Some(inner.target_system),
36443            Self::PLAY_TUNE(inner) => Some(inner.target_system),
36444            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
36445            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
36446            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
36447            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
36448            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
36449            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
36450            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
36451            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
36452            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
36453            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
36454            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
36455            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
36456            Self::SET_MODE(inner) => Some(inner.target_system),
36457            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
36458            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
36459            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
36460            Self::TIMESYNC(inner) => Some(inner.target_system),
36461            Self::TUNNEL(inner) => Some(inner.target_system),
36462            Self::V2_EXTENSION(inner) => Some(inner.target_system),
36463            _ => None,
36464        }
36465    }
36466    fn target_component_id(&self) -> Option<u8> {
36467        match self {
36468            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
36469            Self::CANFD_FRAME(inner) => Some(inner.target_component),
36470            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
36471            Self::CAN_FRAME(inner) => Some(inner.target_component),
36472            Self::COMMAND_ACK(inner) => Some(inner.target_component),
36473            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
36474            Self::COMMAND_INT(inner) => Some(inner.target_component),
36475            Self::COMMAND_LONG(inner) => Some(inner.target_component),
36476            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
36477            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
36478            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
36479            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
36480            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
36481            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
36482            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
36483            Self::LOGGING_ACK(inner) => Some(inner.target_component),
36484            Self::LOGGING_DATA(inner) => Some(inner.target_component),
36485            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
36486            Self::LOG_ERASE(inner) => Some(inner.target_component),
36487            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
36488            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
36489            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
36490            Self::MISSION_ACK(inner) => Some(inner.target_component),
36491            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
36492            Self::MISSION_COUNT(inner) => Some(inner.target_component),
36493            Self::MISSION_ITEM(inner) => Some(inner.target_component),
36494            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
36495            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
36496            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
36497            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
36498            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
36499            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
36500            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
36501            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
36502            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
36503            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
36504            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
36505            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
36506            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
36507            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
36508            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
36509            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
36510            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
36511            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
36512            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
36513            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
36514            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
36515            Self::PARAM_SET(inner) => Some(inner.target_component),
36516            Self::PING(inner) => Some(inner.target_component),
36517            Self::PLAY_TUNE(inner) => Some(inner.target_component),
36518            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
36519            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
36520            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
36521            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
36522            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
36523            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
36524            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
36525            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
36526            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
36527            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
36528            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
36529            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
36530            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
36531            Self::TIMESYNC(inner) => Some(inner.target_component),
36532            Self::TUNNEL(inner) => Some(inner.target_component),
36533            Self::V2_EXTENSION(inner) => Some(inner.target_component),
36534            _ => None,
36535        }
36536    }
36537}